Skip to content

Instantly share code, notes, and snippets.

View A1rPun's full-sized avatar
🌊
Fractalicious

Thom Bakker A1rPun

🌊
Fractalicious
  • The Netherlands
View GitHub Profile
@jamesfreeman959
jamesfreeman959 / keepawake.ps1
Last active May 7, 2024 14:52
A very simple PowerShell script to keep a Windows PC awake and make lync think the user is active on the keyboard
# Useful references:
#
# https://superuser.com/questions/992511/emulate-a-keyboard-button-via-the-command-line
# https://ss64.com/vb/sendkeys.html
# https://social.technet.microsoft.com/Forums/windowsserver/en-US/96b339e2-e9da-4802-a66d-be619aeb21ac/execute-function-one-time-in-every-10-mins-in-windows-powershell?forum=winserverpowershell
# https://learn-powershell.net/2013/02/08/powershell-and-events-object-events/
#
# Future enhancements - use events rather than an infinite loop
$wsh = New-Object -ComObject WScript.Shell
while (1) {
@egmontkob
egmontkob / Hyperlinks_in_Terminal_Emulators.md
Last active May 3, 2024 11:35
Hyperlinks in Terminal Emulators
@keithamus
keithamus / guestbook.gif
Last active April 29, 2024 05:18
Click here to sign my guestbook!
guestbook.gif
@lunohodov
lunohodov / ral_classic.csv
Last active April 24, 2024 01:14
RAL Classic color table (CSV)
We can make this file beautiful and searchable if this error is corrected: It looks like row 10 should actually have 11 columns, instead of 4. in line 9.
RAL,RGB,HEX,CMYK,LRV,English,German,French,Spanish,Italian,Dutch
RAL 1000,205-186-136,#CDBA88,0-9-34-20,51.79,Green beige,Grünbeige,Beige vert,Beige verdoso,Beige verdastro,Groenbeige
RAL 1001,208-176-132,#D0B084,0-15-37-18,48.09,Beige,Beige,Beige,Beige,Beige,Beige
RAL 1002,210-170-109,#D2AA6D,0-19-48-18,45.07,Sand yellow,Sandgelb,Jaune sable,Amarillo arena,Giallo sabbia,Zandgeel
RAL 1003,249-169-0,#F9A900,0-32-100-2,49.05,Signal yellow,Signalgelb,Jaune de sécurité,Amarillo señales,Giallo segnale,Signaalgeel
RAL 1004,228-158-0,#E49E00,0-31-100-11,42.13,Golden yellow,Goldgelb,Jaune or,Amarillo oro,Giallo oro,Goudgeel
RAL 1005,203-143-0,#CB8F00,0-30-100-20,34.15,Honey yellow,Honiggelb,Jaune miel,Amarillo miel,Giallo miele,Honinggeel
RAL 1006,225-144-0,#E19000,0-36-100-12,37.45,Maize yellow,Maisgelb,Jaune maïs,Amarillo maíz,Giallo polenta,Maisgeel
RAL 1007,232-140-0,#E88C00,0-40-100-9,37.63,Daffodil yellow,Narzissengelb,Jaune narcisse,Amarillo narciso,Giallo narciso,Narcissengeel
RAL 1011,175-128-80,#AF8050,0-27
@conorbuck
conorbuck / angle-between-points.js
Created May 5, 2012 22:51
JavaScript: Find the angle between two points
var p1 = {
x: 20,
y: 20
};
var p2 = {
x: 40,
y: 40
};
@eligrey
eligrey / object-watch.js
Created April 30, 2010 01:38
object.watch polyfill in ES5
/*
* object.watch polyfill
*
* 2012-04-03
*
* By Eli Grey, http://eligrey.com
* Public Domain.
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
*/
@sim642
sim642 / DI.m3u
Created July 5, 2015 12:52
Digitally Imported premium streams
#EXTM3U
#EXTINF:-1,Digitally Imported - Ambient
http://pub1.diforfree.org:8000/di_ambient_hi
#EXTINF:-1,Digitally Imported - Big Room House
http://pub1.diforfree.org:8000/di_bigroomhouse_hi
#EXTINF:-1,Digitally Imported - Breaks
http://pub1.diforfree.org:8000/di_breaks_hi
@sebastiencs
sebastiencs / volume.sh
Last active February 13, 2024 11:19
Script to get volume notification with dunst http://imgur.com/a/qWgAw
#!/bin/bash
# You can call this script like this:
# $./volume.sh up
# $./volume.sh down
# $./volume.sh mute
function get_volume {
amixer get Master | grep '%' | head -n 1 | cut -d '[' -f 2 | cut -d '%' -f 1
}
@kethinov
kethinov / walksync.js
Created September 22, 2013 09:04
List all files in a directory in Node.js recursively in a synchronous fashion
// List all files in a directory in Node.js recursively in a synchronous fashion
var walkSync = function(dir, filelist) {
var fs = fs || require('fs'),
files = fs.readdirSync(dir);
filelist = filelist || [];
files.forEach(function(file) {
if (fs.statSync(dir + file).isDirectory()) {
filelist = walkSync(dir + file + '/', filelist);
}
else {
@dduan
dduan / Makefile
Created December 29, 2017 04:13
"Hello, World!" In WebAssembly
compile:
wat2wasm main.wat -o main.wasm
serve:
python -m SimpleHTTPServer