Skip to content

Instantly share code, notes, and snippets.

View ksimmulator's full-sized avatar

Keith Simmons ksimmulator

View GitHub Profile
#!/bin/bash
# script by keith simmons
COUNTER=1
# make the TSV header
echo -e "Title\tDescription\tPreview\tNumber of views (last 30 days)\tNumber of links to here\tSize in bytes\tLink\tPermalink\t`date`"
while [ $COUNTER -le 10 ]
do
@ksimmulator
ksimmulator / autoexec.cfg
Last active August 3, 2019 22:04
CS:GO config
////////////////////////////////////////////////////////////////////////////////
/// autoexec.cfg for CS:GO by oneironaut
/// Latest: https://gist.github.com/ksimmulator/a3021985143584ce5679dbae05913a78
/// Launch options: -novid -threads 8 -nojoy -noaafonts -console -panorama
/// Steam profile: https://steamcommunity.com/profiles/76561198043554857
////////////////////////////////////////////////////////////////////////////////
echo ">>> loading autoexec.cfg <<<"
fps_max "300" // faster than monitor is good
fps_max_menu "31" // no reason to be faster than monitor, let gpu cool down
@ksimmulator
ksimmulator / make_gif.sh
Last active October 21, 2015 19:38
turns an input movie into a gif with custom palette
#!/bin/bash
#
# make_gif.sh - turn an input movie into a gif with custom palette
#
# This script is an automated version of a great post by LordNeckbeard:
# http://superuser.com/a/556031
#
# Keith Simmons <ksimmons@gmail.com>
# This should point to your copy of ffmpeg
@ksimmulator
ksimmulator / map-to-audio-channel.sh
Last active October 20, 2015 17:29
A script that remixes an audio input file to one channel in a 5.1 layout
#!/bin/bash
#
# map-to-audio-channel.sh - renders a 5.1 surround sound output file with the
# input audio on one track only in .ogg format
#
# Keith Simmons <ksimmons@gmail.com>
# This should point to your copy of ffmpeg
FFMPEG=./ffmpeg
# This should point to an audio file full of silence (can generate with audacity)
@ksimmulator
ksimmulator / gist:42cffe116732ac3fdd22
Created March 24, 2015 18:32
Selecting a button on the canvas for keyboard navigation
using UnityEngine;
using System.Collections;
using UnityEngine.EventSystems;
public class SelectBeginButton : MonoBehaviour {
public GameObject button;
// Use this for initialization
void Start () {
@ksimmulator
ksimmulator / gist:010908f4723617976d32
Created March 24, 2015 18:22
Various UI methods for unity canvas
using UnityEngine;
using System.Collections;
using UnityEngine.EventSystems;
using UnityEngine.UI;
public class enableGlow : MonoBehaviour, IPointerDownHandler, IPointerUpHandler {
public GameObject glowLayer;
public GameObject fillLayer;
@ksimmulator
ksimmulator / gist:6141182
Created August 2, 2013 16:16
auto hotkey
#Persistent
SetTitleMatchMode, 2
WinGetTitle, TitleLast, ahk_class GLUT
SetTimer, CheckChanged, 250 ;Check every quarter-second
return
CheckChanged:
WinGetTitle, Title, ahk_class GLUT
If (Title <> TitleLast)
@ksimmulator
ksimmulator / tessellated_truncated_tetrahedron_of_life.ino
Last active December 19, 2015 07:09
capacitive touch sensing code for an RGB LED sculpture
// tessellated_truncated_tetrahedron_of_life
// by Keith Simmons
// http://ksimmulator.com
//
// Latest version of this code is here: https://gist.github.com/ksimmulator/5916152
#include <Adafruit_NeoPixel.h>
#include <CapacitiveSensor.h>
#include <EEPROM.h>
@ksimmulator
ksimmulator / Interrupt.ino
Created November 27, 2012 21:58
Rainbow Pulse
volatile int rate[10]; // used to hold last ten IBI values
volatile unsigned long sampleCounter = 0; // used to determine pulse timing
volatile unsigned long lastBeatTime = 0; // used to find the inter beat interval
volatile int P =512; // used to find peak in pulse wave
volatile int T = 512; // used to find trough in pulse wave
volatile int thresh = 512; // used to find instant moment of heart beat
volatile int amp = 100; // used to hold amplitude of pulse waveform
@ksimmulator
ksimmulator / SpaceBoard.ino
Created October 30, 2012 18:42
Space Board code for controlling RGB LED Lights
///////////////////////////////////////////////////////////////
// Space Board code for controlling RGB LED Lights
// on a skateboard via acceleration, motion, and orientation
//
// created by Keith Simmons
// http://ksimmulator.com
//
// demo video: http://www.youtube.com/watch?v=3NSgN4Y2Wfs
//
// 20121031: fixed some bugs by adding constrain(x,a,b) calls