Skip to content

Instantly share code, notes, and snippets.

View nikp123's full-sized avatar
🎯
university does like to bother me a lot

nikp123 nikp123

🎯
university does like to bother me a lot
View GitHub Profile
@adtac
adtac / Dockerfile
Last active May 16, 2025 08:58
#!/usr/bin/env docker run
#!/usr/bin/env -S bash -c "docker run -p 8080:8080 -it --rm \$(docker build --progress plain -f \$0 . 2>&1 | tee /dev/stderr | grep -oP 'sha256:[0-9a-f]*')"
# syntax = docker/dockerfile:1.4.0
FROM node:20
WORKDIR /root
RUN npm install sqlite3
@etiennecollin
etiennecollin / makefile_vhdl
Last active May 12, 2025 20:32
Easily compile and simulate VHDL entities using GHDL and GTKWave. See instructions in the top comment.
# By Etienne Collin
# https://gist.github.com/etiennecollin/198f7520c4c58d545368a196e08f83ed
# Dependencies (on macOS, install via Homebrew (https://brew.sh/)):
# ghdl:
# Source: https://github.com/ghdl/ghdl/
# gtkwave:
# Source: https://gtkwave.sourceforge.net/
#### INPUT REQUIRED ####
ENTITIES = entityName1 entityName2
@rajkosto
rajkosto / gist:fbfa22a3c6d6bff7d9ebf92ec8adeb34
Last active April 9, 2025 12:44
Yettel Hipernet ZTE ZXHN H298Q detalji, i tutorial za izvlacenje podataka iz config fajla
ZTE Yettel ruter uspostavlja sledece veze preko svog WAN kabla:
Connection: Management
DHCP IPoE VLAN 715 Priority 0
Vendor class dslforum.org
IP address 10.48.x.x/255.254.0.0
Ovu mrezu koristi da komunicira sa TR069 ACS-om na adresi https://acs.cetin.rs:10302/acs/serbia
Connection: Voice
DHCP IPoE VLAN 711 Priority 5
@nongio
nongio / main.c
Last active October 1, 2021 18:46
A very ugly Wayland EGL Cairo-gl example
// https://gist.github.com/Miouyouyou/ca15af1c7f2696f66b0e013058f110b4
// https://gist.github.com/nikp123/bebe2d2dc9a8287efa9ba0a5b38ffab4
#include <wayland-client-core.h>
#include <wayland-client.h>
#include <wayland-server.h>
#include <wayland-client-protocol.h>
#include <wayland-egl.h> // Wayland EGL MUST be included before EGL headers
#include "xdg-shell-client-protocol.h"
@pratyakshm
pratyakshm / windowsinstallusingdism.md
Last active May 17, 2025 07:23
Installing Windows 11 on any device using DISM

Install Windows 11 on unsupported devices

Guide to install Windows 11 on any PC (does not involve ISO modifications) This guide will take you through a clean and simple way to install Windows 11 on your device by bypassing all requirements without doing any ISO modifications. Note: Guide shows fresh installation only.

Requirements:

  1. ISO file (Link 1) (Link 2) (22000.65)
  2. Rufus Microsoft Store GitHub Website
  3. USB drive [8GB or more]
@farmerbb
farmerbb / scrcpy-desktop-mode.sh
Last active December 13, 2024 16:22
Pseudo-desktop mode using scrcpy
#!/bin/bash
show-help() {
BASENAME=$(basename "$0")
echo "Usage: $BASENAME [device-name] [optional-resolution] [optional-density]"
exit 1
}
[[ $1 = "-h" || $1 = "--help" ]] && show-help
@bulletmark
bulletmark / wifi-switcher
Last active March 1, 2025 22:00
Small program to switch wifi off/on when wired connection goes on/off
#!/usr/bin/env python3
# If you are using Linux NetworkManager then this dispatcher script toggles
# your wifi radio ON whenever all your wired connections are not connected, or
# turns the wifi radio OFF when any wired connection is connected. Simply copy
# this to /etc/NetworkManager/dispatcher.d/99-wifi and ensure it is executable
# (i.e. `sudo chmod 755 /etc/NetworkManager/dispatcher.d/99-wifi`). No other
# configuration is required. Get the latest version from
# https://gist.github.com/bulletmark/8e051a0a9ffdce689d86988c528e7764
# Author: Mark Blakeney, Jun 2020.
from __future__ import annotations

Flashing Marlin to a Monoprice Maker Select V2

These notes were written March 2020, and may be out of date. I'm flashing Marlin 2.0.4.4 using a Bus Pirate from macOS Catalina.

Support for the Monoprice Maker Select V2, aka Wanhao Duplicator i3 V2.1, has been merged into Marlin, so you should not need to find any third-party code or mysterious config files posted to Reddit years ago.

Install prerequisites:

brew install avrdude platformio
This work, excluding the Arch Linux logo, is made available under CC0: https://creativecommons.org/publicdomain/zero/1.0/
@Miouyouyou
Miouyouyou / init_window.c
Created December 15, 2016 07:55
A very ugly Wayland EGL OpenGL example
// gcc -o test init_window.c -I. -lwayland-client -lwayland-server -lwayland-client-protocol -lwayland-egl -lEGL -lGLESv2
#include <wayland-client.h>
#include <wayland-server.h>
#include <wayland-client-protocol.h>
#include <wayland-egl.h> // Wayland EGL MUST be included before EGL headers
#include "init_window.h"
#include "log.h"
#include <string.h>