Skip to content

Instantly share code, notes, and snippets.

View electricjesus's full-sized avatar
🐅

Seth Malaki electricjesus

🐅
View GitHub Profile
@ndarville
ndarville / webm.md
Last active September 30, 2023 18:56
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.
@electricjesus
electricjesus / elasticsearch.rake
Created October 31, 2012 04:58 — forked from jarosan/elasticsearch.rake
Elasticsearch reindex task
# Run with: rake environment elasticsearch:reindex
# must have : tire, will_paginate
# added multiple classes to reindex
namespace :elasticsearch do
desc "re-index elasticsearch"
task :reindex => :environment do
[Place, Time] # <--- CONFIGURE HERE: Provided that you have classes called 'Place and Time which have the necessary Tire callbacks
@dariocravero
dariocravero / README.md
Created October 20, 2012 05:25
Save files in Meteor

Create a Meteor app and put the client_/server_ files in a client/server directories. Also, create a public dir to save the uploaded files.

@litchfield
litchfield / doubledecode.py
Created October 12, 2011 21:53
Double decode utf8 and cp1252
#!/usr/bin/env python
"""
Ever had a mysqldump of utf8 data stored in latin1 tables, dumped in utf8 and
munged with windows cp1252?
If so this is your friend. Just pipe it through this little baby and spare
yourself hours of unicode hell- it'll take your dirt and spit out clean utf8.
You can also import it and use it in your python code.