Skip to content

Instantly share code, notes, and snippets.

View shurizzle's full-sized avatar
🤌

shurizzle shurizzle

🤌
  • Vodafone, Internet
View GitHub Profile
@ndarville
ndarville / webm.md
Last active March 11, 2025 17:21
4chan’s guide to converting GIF to WebM - https://boards.4chan.org/g/res/41212767

Grab ffmpeg from https://www.ffmpeg.org/download.html

It's a command line tool which means you will have to type things with your keyboard instead of clicking on buttons.

The most trivial operation would be converting gifs:

ffmpeg -i your_gif.gif -c:v libvpx -crf 12 -b:v 500K output.webm
  • -crf values can go from 4 to 63. Lower values mean better quality.
  • -b:v is the maximum allowed bitrate. Higher means better quality.
@mathiasbynens
mathiasbynens / .gitignore
Last active August 7, 2024 02:26
Generating a regular expression to match valid JavaScript identifiers (like https://mathiasbynens.be/demo/javascript-identifier-regex) in Node.js
package-lock.json
node_modules
@shurizzle
shurizzle / gist:1223923
Created September 17, 2011 13:14
Turn a github.com URL into a git.io URL.
#!/usr/bin/env ruby
# Usage: gitio URL [CODE]
#
# Turns a github.com URL
# into a git.io URL
#
# Copies the git.io URL to your clipboard.
require 'net/http'
require 'clipboard'
@shurizzle
shurizzle / euler.rb
Created April 28, 2011 14:54
Euler Project 1-50 in a cool ruby dsl
# Usage example:
# ruby -r/path/to/this/file 'Euler.execute 1'
# library {{{
require 'benchmark'
require 'fffs'
fs = FFFS::FileSystem.parse(__FILE__ == $0 ? DATA : File.read(__FILE__).split(/^__END__$/, 2).last) #DATA doesn't work if required
class NilClass
@shurizzle
shurizzle / gist:893694
Created March 30, 2011 01:23
FastCGI dispatcher for Padrino in ruby 1.9.x (needed for lighty)
#!/usr/bin/env ruby
# require rack fastcgi {{{
require 'rack/handler/fastcgi'
# support for ruby 1.9.x {{{
class FCGI; class ValuesRecord
def self::read_length(buf)
if buf.getbyte(0) >> 7 == 0
buf.slice!(0, 1).getbyte(0)
#!/usr/bin/env ruby
# who the fuck said Ruby couldn't be hacky, NEVER DO THIS IT IS STUPID
# AND DOING IT WRONG TOO
require 'socket'
# DEBUG {{{
class TCPSocket
alias __gets__ gets
def gets(*args)