Skip to content

Instantly share code, notes, and snippets.

View infrafloss.json
# Infrafloss, a fairyfloss for the infra among us
# Intended for use with nopjmp's fairyfloss VS Code extention
# VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=nopjmp.fairyfloss
# Copy this file into your settings.json
"workbench.colorTheme": "fairyfloss",
"editor.tokenColorCustomizations":
{
"textMateRules":
[
View echocircle3.pde
int[][] result;
float t, c;
public float ease(float p) {
return 3*p*p - 2*p*p*p;
}
public float ease(float p, float g) {
if (p < 0.5f)
return 0.5f * pow(2*p, g);
@victor-shepardson
victor-shepardson / pytorch-glumpy.md
Last active Jan 21, 2021
using pycuda and glumpy to draw pytorch GPU tensors to the screen without copying to host memory
@mikoim
mikoim / README.md
Last active Jun 13, 2021
[Updated! Aug 14 2020] YouTube recommended encoding settings on ffmpeg (+ libx264)
View README.md

Parameters

Container: MP4

Parameter YouTube recommends setting
-movflags faststart moov atom at the front of the file (Fast Start)

Video codec: H.264

View get_urls.txt
#!/usr/bin/env python
'''Build up a set of URLs using the common crawl index. See
http://commoncrawl.org/2015/04/announcing-the-common-crawl-index/ for more info.
'''
from __future__ import print_function
import gzip
import logging
import os
import random
View gist:ca0e6a2ae70b38d2bba4
int[][] result;
float t;
void setup() {
setup_();
result = new int[width*height][3];
}
void draw() {
@M66B
M66B / gist:62793616a6359886d4c8
Last active Apr 1, 2017
Acer C720 fix tearing
View gist:62793616a6359886d4c8
sudo nano /usr/share/X11/xorg.conf.d/20-intel.conf
Section "Device"
Identifier "Intel Graphics"
Driver "intel"
Option "AccelMethod" "sna"
Option "TearFree" "true"
EndSection
Settings > Window Manager Tweaks > Enable display compositing
@jkottke
jkottke / gist:8739051
Last active May 7, 2020
A list of design/writing/coding music recommendations from my Twitter followers
View gist:8739051
Not sure how to summarize/organize this into something useful. Some can be made into Spotify/Rdio playlists, but others are likely unavailable and some are just URLs to other services. Genre is all over the place as well...lots of ambient and classical, soundtracks, uptempo dancey stuff, rock w/ words, and even Slayer. Not sure all that can be put into one playlist that's useful for anyone. What I'm saying is, good luck!
fantoraygun ‏@fantoraygun 1h
@jkottke some great mixes here: http://musicforprogramming.net/
Andrew ‏@jandrewc 1h
@jkottke "From here we go sublime" by The Field and "Alive 2007" by Daft Punk.
Lenny ‏@lenny_ 1h
@jkottke SomaFM's Groove Salad station
@rogerallen
rogerallen / leip_polyrhythm.clj
Created Apr 30, 2013
Fun with Leipzig/Overtone & Polyrhythms
View leip_polyrhythm.clj
(ns explore-overtone.leip-polyrhythm
(:require [overtone.live :as o]
[leipzig.live :as ll]
[leipzig.melody :as lm]))
(def snare (o/sample (o/freesound-path 26903)))
(def kick (o/sample (o/freesound-path 2086)))
(def close-hihat (o/sample (o/freesound-path 802)))
(def open-hihat (o/sample (o/freesound-path 26657)))
(def clap (o/sample (o/freesound-path 48310)))
@dataolle
dataolle / sendxbmc.sh
Created Dec 4, 2012
send url to xbmc's json-rpc service for playback on the big screen
View sendxbmc.sh
#!/bin/bash
#set url and port to the xbmc box webservice
XBMC_HOST="http://127.0.0.1:8080"
if [ "$1" = "" ]; then
echo -n "Insert URL: "
read url
else
url="$1"
fi