Skip to content

Instantly share code, notes, and snippets.

View 2xAA's full-sized avatar
👨‍💻
doin a code

Sam Wray 2xAA

👨‍💻
doin a code
View GitHub Profile
@tmpvar
tmpvar / svg2gcode.js
Created February 10, 2012 23:26
stupid easy line based svg to gcode converter
// The intention here is that you load up the svg in a browser and run the following
// in the console
var
s = 1,//-0.35,
cz = 144, // cut z
sz = 142, // safe z
materialWidth = 6, // in mm
passes = 3,
passWidth = materialWidth/passes,
@felipecsl
felipecsl / restart coreaudio daemon
Last active October 24, 2024 13:20
Restart Mac OS X coreaudio daemon. Useful if you cannot change the audio output device to Airplay.
sudo kill `ps -ax | grep 'coreaudiod' | grep 'sbin' |awk '{print $1}'`
# or...
sudo killall coreaudiod
@joelpryde
joelpryde / gist:5224151
Created March 22, 2013 19:42
GLSL clouds
/**
* @title Cloud Demo
* @version v0.3
* @author Mark Sleith
* @website www.cngames.co.uk/portfolio
* @date 15/08/2012
*
* @note Noise and fBm from iq's latest live coding video, "a simple eye ball".
*
* @todo Add varying cloud density, cloud illumination.
@protrolium
protrolium / YouTube API — getting video thumbnail
Created February 5, 2014 19:57
YouTube API — getting video thumbnail
Each YouTube video has 4 generated images. They are predictably formatted as follows:
http://img.youtube.com/vi/<insert-youtube-video-id-here>/0.jpg
http://img.youtube.com/vi/<insert-youtube-video-id-here>/1.jpg
http://img.youtube.com/vi/<insert-youtube-video-id-here>/2.jpg
http://img.youtube.com/vi/<insert-youtube-video-id-here>/3.jpg
The first one in the list is a full size image and others are thumbnail images. The default thumbnail image (ie. one of 1.jpg, 2.jpg, 3.jpg) is:
http://img.youtube.com/vi/<insert-youtube-video-id-here>/default.jpg
@conatus
conatus / ello.md
Last active April 13, 2023 19:32
Ello API

Ello API

This is a basic exploration of the Ello API. Completely unofficial, your mileage my vary, don't smash their servers as they are likely very busy.

Methods return HTML for their representation where appropriate which is a nice little pattern. Everything returns application/json.

Like this:

{
 "id": ,
anonymous
anonymous / gist:9523efecaa7d2542a405d129d4e3d15f
Created May 14, 2016 16:13
Arduino YM2149 MIDI Synth
// Arduino YM2149 MIDI Synth
// by yukimizake
// video: https://youtu.be/hUPs2pv5d_g
// schematics: http://electronicfields.wordpress.com/?attachment_id=128 (Vcc/GND not shown)
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
@jamesmacwhite
jamesmacwhite / ffmpeg_mkv_mp4_conversion.md
Last active November 11, 2024 21:28
Easy way to convert MKV to MP4 with ffmpeg

Converting mkv to mp4 with ffmpeg

Essentially just copy the existing video and audio stream as is into a new container, no funny business!

The easiest way to "convert" MKV to MP4, is to copy the existing video and audio streams and place them into a new container. This avoids any encoding task and hence no quality will be lost, it is also a fairly quick process and requires very little CPU power. The main factor is disk read/write speed.

With ffmpeg this can be achieved with -c copy. Older examples may use -vcodec copy -acodec copy which does the same thing.

These examples assume ffmpeg is in your PATH. If not just substitute with the full path to your ffmpeg binary.

Single file conversion example

@jminor
jminor / Standard-DoubleSided.shader
Created June 1, 2017 16:30
Unity Standard-DoubleSided.shader
Shader "Standard-DoubleSided"
{
Properties
{
_Color("Color", Color) = (1,1,1,1)
_MainTex("Albedo", 2D) = "white" {}
_Cutoff("Alpha Cutoff", Range(0.0, 1.0)) = 0.5
_Glossiness("Smoothness", Range(0.0, 1.0)) = 0.5

DX7

image

Note: One of the algorithms is incorrect due to a missing operator. Need to update the image. Will have to get on that soon.

These are the original 32 algorithms as used in Yamaha DX7.

The later Yamaha FS1R and Yamaha SY77 may have compatibility with these algorithms, but that's beyond the current scope. The FS1R contains 88 algorithms, while the SY77 contains 45 algorithms.

@kbola
kbola / PortamentoGlideLogicProX
Last active July 10, 2024 20:34
Portamento / Glide MIDI Scripter Plugin for Logic Pro X
/*
Portamento / Glide MIDI Scripter Plugin for Logic Pro X
https://www.reddit.com/r/Logic_Studio/comments/8901vy/request_midi_script_for_faking_glideportamento/
Bolasol, Inc. 2018
*/