Skip to content

Instantly share code, notes, and snippets.

View L1fescape's full-sized avatar

Andrew Kennedy L1fescape

View GitHub Profile
import RPi.GPIO as GPIO
import time
ledPin = 18
GPIO.setmode(GPIO.BCM)
GPIO.setup(ledPin, GPIO.OUT)
GPIO.output(ledPin, GPIO.LOW)
try:
@L1fescape
L1fescape / autoexec.cfg
Last active October 29, 2022 09:46
A script for installing, updating, and playing steam games on your own dedicated server
log on
hostname "Welcome to L1fescape's CS:GO Server!"
rcon_password "<pass>"
sv_password ""
sv_cheats 0
sv_lan 0
sv_setsteamaccount <workshop_key>
exec banned_user.cfg
@L1fescape
L1fescape / py-server-win10.sh
Created March 24, 2016 04:48
Run a python server on windows 10
"C:\Program Files\Python\python.exe" -m http.server
@L1fescape
L1fescape / Experiment 1
Created January 27, 2016 00:30
Sonic Pi Experiments
# drums
live_loop :kick do
sample :bd_haus, rate: 1
sleep 0.5
end
live_loop :snare do
sleep 0.5
sample :sn_dub, rate: 1
sleep 0.5
@L1fescape
L1fescape / audiosetup.bat
Created September 17, 2015 16:31
Bat file for starting Virtual Audio Cable with my settings
start "audiorepeater" "%programfiles%\Virtual Audio Cable\audiorepeater.exe" /Input: "Line 3 (Virtual Audio Cable)" /Output: "Line 1 (Virtual Audio Cable)" /BufferMs:100 /SamplingRate:96000 /Priority:high /Autostart
start "audiorepeater" "%programfiles%\Virtual Audio Cable\audiorepeater.exe" /Input: "Microphone (Realtek High Defini" /Output: "Line 1 (Virtual Audio Cable)" /BufferMs:100 /SamplingRate:96000 /Priority:high /Autostart
start "audiorepeater" "%programfiles%\Virtual Audio Cable\audiorepeater.exe" /Input: "Line 3 (Virtual Audio Cable)" /Output: "Speakers (Realtek High Definiti" /BufferMs:100 /SamplingRate:96000 /Priority:high /Autostart
@L1fescape
L1fescape / autoexec.cfg
Last active August 3, 2017 11:25
CS:GO bindings and settings
// Aliases
alias "m4/ak" "buy m4a1; buy ak47;"
alias "aug/sg" "buy aug; buy sg556;"
alias "galil/famas" "buy galilar; buy famas;"
alias "g3sg1/scar20" "buy g3sg1; buy scar20;"
alias "goodpistol" "buy fiveseven; buy tec9;"
alias "cheapsmg" "buy mac10; buy mp9;"
alias "bbq" "buy incgrenade; buy molotov;"
alias "disc" "disconnect"
@L1fescape
L1fescape / index.js
Created June 7, 2015 21:10
requirebin sketch
// require() some stuff from npm (like you were using browserify)
// and then hit Run Code to run it on the right
var _ = require('lodash');
var x = 1000;
function randomColor(){
return '#' + ((1<<24) * Math.random()|0).toString(16);
}
var generateGrid = function(){
@L1fescape
L1fescape / hackingtime.java
Created May 29, 2015 06:21
Time hack code snippet from the movie Kung Fury
DateTime warp = new DateTime(12, 33.9, 15);
warp.accessDimension(4);
for (int i = 0; i < warp.getGoal(); i++) {
double v = Math.power(m*c, 2);
warp.hackTime();
warp.advance(i.toTimeInterval());
}
if (past.currentDate() == warp.currentDate()) {
System.out.println("Time Hacked successfully.");
}
setInterval(function(){
for (var i = 0, nodes = document.querySelectorAll('*'); i < nodes.length; i++) {
nodes[i].style.border = '10px solid #' + Math.floor(Math.random()*16777215).toString(16);
}
}, 100);
@L1fescape
L1fescape / v8_console.cpp
Last active October 27, 2015 18:39
Add console.log to v8
// ... import v8 ...
static void LogCallback(const v8::FunctionCallbackInfo<v8::Value>& args) {
if (args.Length() < 1) return;
HandleScope scope(args.GetIsolate());
Handle<Value> arg = args[0];
String::Utf8Value value(arg);
printf("%s\n", *value);
}