Skip to content

Instantly share code, notes, and snippets.

View L-four's full-sized avatar

Kyah Rindlisbacher L-four

View GitHub Profile
@L-four
L-four / brainfuck.markdown
Created January 19, 2024 00:04
brainFuck
document.querySelector('#chat-area').addEventListener('DOMNodeInserted', function() {
document.querySelector('#playlistAddInput').value = document.querySelector('#chat-area li .msg').textContent;
addToPlaylist();
});
/*
Rotates through 480 steps every time the button is pressed.
Check your equipment to find out how many motor steps it takes for a full rotation. In my case it's 4800.
4800/sides or gear teeth you need to cut = number to put into "const int pulseset"
*/
int count = 0;
const int pulseset = 480; //change this to change how many sides/gear teeth. 4800 pulses per rotation on my spindexer.
const int directionPin = 8;
const int pulsePin = 9; // the stepper driver gives one step at the rising edge of the pulse from the Arduino.
const int sensorValue = 1000; // sets the speed of rotation. 1000 is slow, 10 is fast
@L-four
L-four / Cookie.js
Created July 14, 2015 03:36
Cookie.js
@L-four
L-four / .rtorrent.rc
Last active December 15, 2015 15:18
My rtorrent config
# This is an example resource file for rTorrent. Copy to
# ~/.rtorrent.rc and enable/modify the options as needed. Remember to
# uncomment the options you wish to enable.
# Maximum and minimum number of peers to connect to per torrent.
#min_peers = 40
#max_peers = 100
# Same as above but for seeding completed torrents (-1 = same as downloading)
#min_peers_seed = 10
var str_pad = function(str, len, pad, left) {
var tmp = [str];
tmp[left?"unshift":"push"](new Array(len).join(pad||"0"));
return tmp.join('');
};
@L-four
L-four / extsubs.py
Created October 16, 2012 11:27
Basic script for extracting SSA/ASS subs from mkv(matroska) and converting them to webvtt
#!/usr/bin/env python3
import sys
import os
import re
import subprocess
def get_files_subs(file):
file = file.rstrip('\n')
qfile = quote(file)
@L-four
L-four / MLLES.ba
Created April 18, 2012 02:29
My Little Linux Environment Setup
#!/usr/bin/env bash
VERSION=0.01
version(){
echo "MLLES $VERSION"
}
while getopts lhv OPT
do
@L-four
L-four / gist:2405585
Created April 17, 2012 12:06
g+ full sized images and google image search
/*! jQuery v1.7.1 jquery.com | jquery.org/license */
(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cu(a,b){var c={};f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a});return c}function ct(){cr=b}function cs(){setTimeout(ct,0);return cr=f.now()}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d
@L-four
L-four / gist:2382400
Created April 14, 2012 06:06
My git config
[user]
email = email
name = name
[color]
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]