Skip to content

Instantly share code, notes, and snippets.

@mikoim
mikoim / README.md
Last active April 6, 2024 17:34
[Updated! Aug 14 2020] YouTube recommended encoding settings on ffmpeg (+ libx264)

Parameters

Container: MP4

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

Video codec: H.264

@fivethreeo
fivethreeo / export_bezier_threejs.py
Last active January 15, 2024 04:47
Script to export bezier curves from blender to three.js
import bpy
myCurve = bpy.data.curves[0] # here your curve
spline= myCurve.splines[0] # maybe you need a loop if more than 1 spline
scale = 200
curvepath_template = """
var curves = new THREE.CurvePath();
%s
@xzj
xzj / clojure.ctags
Created December 25, 2011 07:00
my .ctags(exuberant-ctags) for Clojure
--langdef=Clojure
--langmap=Clojure:.clj
--regex-clojure=/\([ \t]*create-ns[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/n,namespace/
--regex-clojure=/\([ \t]*def[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/d,definition/
--regex-clojure=/\([ \t]*defn[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/f,function/
--regex-clojure=/\([ \t]*defn-[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/p,private function/
--regex-clojure=/\([ \t]*defmacro[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/m,macro/
--regex-clojure=/\([ \t]*definline[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/i,inline/
--regex-clojure=/\([ \t]*defmulti[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/a,multimethod definition/
--regex-clojure=/\([ \t]*defmethod[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/b,multimethod instance/
@ardenasasvc
ardenasasvc / infrafloss.json
Last active November 29, 2022 14:26
infrafloss
# 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":
[
@victor-shepardson
victor-shepardson / pytorch-glumpy.md
Last active September 10, 2022 16:09
using pycuda and glumpy to draw pytorch GPU tensors to the screen without copying to host memory
@dataolle
dataolle / sendxbmc.sh
Created December 4, 2012 18:50
send url to xbmc's json-rpc service for playback on the big screen
#!/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
@jkottke
jkottke / gist:8739051
Last active May 7, 2020 10:52
A list of design/writing/coding music recommendations from my Twitter followers
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
#!/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
@wesm
wesm / function_lengths.py
Created January 8, 2012 22:34
Count all function lengths under a directory
from pandas import DataFrame
from pandas.util.testing import set_trace
import os
import numpy as np
import matplotlib.pyplot as plt
dirs = []
names = []
lengths = []
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);