Skip to content

Instantly share code, notes, and snippets.

Avatar

Kyah Rindlisbacher L-four

View GitHub Profile
View gist:b2ce2cbcd4b19390ce642b92c9813ebb
document.querySelector('#chat-area').addEventListener('DOMNodeInserted', function() {
document.querySelector('#playlistAddInput').value = document.querySelector('#chat-area li .msg').textContent;
addToPlaylist();
});
View arduino spindexer
/*
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
View Cookie.js
@L-four
L-four / .rtorrent.rc
Last active Dec 15, 2015
My rtorrent config
View .rtorrent.rc
# 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
View str_pad.js
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 Oct 16, 2012
Basic script for extracting SSA/ASS subs from mkv(matroska) and converting them to webvtt
View extsubs.py
#!/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 Apr 18, 2012
My Little Linux Environment Setup
View MLLES.ba
#!/usr/bin/env bash
VERSION=0.01
version(){
echo "MLLES $VERSION"
}
while getopts lhv OPT
do
@L-four
L-four / gist:2405585
Created Apr 17, 2012
g+ full sized images and google image search
View gist:2405585
/*! 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
View gist:2382400
[user]
email = email
name = name
[color]
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
@L-four
L-four / LICENSE.txt
Created May 24, 2011 — forked from 140bytes/LICENSE.txt
140byt.es -- Click ↑↑ fork ↑↑ to play!
View LICENSE.txt
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE