Skip to content

Instantly share code, notes, and snippets.

View nikp123's full-sized avatar
🏠
Working from home

nikp123 nikp123

🏠
Working from home
View GitHub Profile
@je-so
je-so / testprogram.c
Last active October 21, 2024 22:39
Xlib transparent window with OpenGL support
/*
____ _____
/\__ \ /\ ___\
\/__/\ \ \ \ \__/_
\ \ \ \ \____ \
_\_\ \ \/__/_\ \
/\ _____\ /\ _____\
\/______/ \/______/
Copyright (C) 2011 Joerg Seebohn
@niun
niun / build-kdeconnect-kubuntu-14.04.sh
Last active June 27, 2024 14:07
Build and install kdeconnect from git repository on (k)ubuntu 14.04 and 13.10
sudo apt-get install build-essential cmake kdebase-workspace-dev libqjson-dev git libqca2-dev
git clone git://anongit.kde.org/kdeconnect-kde
cd kdeconnect-kde
cmake -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake-qt4 -DCMAKE_INSTALL_PREFIX=$(kde4-config --prefix) ./
make
sudo make install
qdbus org.kde.kded /kded loadModule kdeconnect
kbuildsycoca4 -noincremental
@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>
This work, excluding the Arch Linux logo, is made available under CC0: https://creativecommons.org/publicdomain/zero/1.0/

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
@bulletmark
bulletmark / wifi-switcher
Last active August 10, 2026 23:32
Program to switch Linux NetworkManager 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
# Python 3.7 or later is required.
# Author: Mark Blakeney, Jun 2020.
@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
@pratyakshm
pratyakshm / windowsinstallusingdism.md
Last active June 24, 2026 10:27
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]
@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"
@rajkosto
rajkosto / gist:fbfa22a3c6d6bff7d9ebf92ec8adeb34
Last active August 12, 2026 15:40
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