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
@je-so
je-so / testprogram.c
Last active May 5, 2024 20:38
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/
@bulletmark
bulletmark / wifi-switcher
Last active June 11, 2024 10:16
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 program 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.
@farmerbb
farmerbb / scrcpy-desktop-mode.sh
Last active March 14, 2023 22:58
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
@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 July 27, 2024 18:19
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
@etiennecollin
etiennecollin / makefile_vhdl
Last active June 29, 2024 14:05
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
@adtac
adtac / Dockerfile
Last active July 24, 2024 14:11
#!/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