Skip to content

Instantly share code, notes, and snippets.

@viktorkelemen
viktorkelemen / gist:3082055
Created July 10, 2012 08:35
Gource with ffmpeg
gource -1280x720 --seconds-per-day 0.1 --key --hide dirnames, -o - | ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i - -vcodec libx264 -preset ultrafast -crf 1 -threads 0 -bf 0 output.mp4
@viktorkelemen
viktorkelemen / gist:2575598
Created May 2, 2012 09:46
Reload the active tab in Chrome with AppleScript
tell application "Google Chrome"
reload active tab of window 1
end tell
@viktorkelemen
viktorkelemen / Custom canvas google maps marker
Created December 9, 2011 15:21
Creating a custom google maps marker with canvas
<!DOCTYPE html>
<html>
<head>
<style>
html {
width: 100%;
height: 100%;
}
body {
@viktorkelemen
viktorkelemen / gist:7068664
Last active December 26, 2015 00:59
Remove "Move to Dropbox" as option from two-finger click menu on Mac
sudo rm -rf /Library/DropboxHelperTools
@viktorkelemen
viktorkelemen / gist:6340572
Created August 26, 2013 11:37
Solving the airplay problem
sudo dscacheutil -flushcache
sudo killall -HUP mDNSResponder
@viktorkelemen
viktorkelemen / gist:5941157
Last active December 19, 2015 10:29
Reversed Binary Numbers
/*
Task
Your task will be to write a program for reversing numbers in binary.
For instance, the binary representation of 13 is 1101,
and reversing it gives 1011, which corresponds to number 11.
Input
The input contains a single line with an integer N, 1 ≤ N ≤ 1000000000.
Output
@viktorkelemen
viktorkelemen / local.yml
Created April 30, 2013 12:50
My Vagrant config/local.yml
memory_size: 8192
cpu_count: 4
@viktorkelemen
viktorkelemen / gist:5382344
Last active December 16, 2015 05:09
VirtualHost set up on OSX
# Set up your custom domain to point
# to localhost in /etc/hosts
127.0.0.1 myapp.dev
# Enable virtual hosts in /etc/apache2/httpd.conf
# by uncommenting the following line
Include /private/etc/apache2/extra/httpd-vhosts.conf
# Add the mapping in /private/etc/apache2/extra/httpd-vhosts.conf
<VirtualHost *:80>
@viktorkelemen
viktorkelemen / gist:5310912
Created April 4, 2013 14:41
Extending git grep with git blame
#!/usr/local/bin/ruby
grep = `git grep -n #{ARGV[0]} #{ARGV[1]}`
interrupt = false
grep.each do |file_with_line|
exit if interrupt
file, line_number, line = file_with_line.split(':', 3)
@viktorkelemen
viktorkelemen / gist:5121783
Last active December 14, 2015 17:19
sandsmade.com photo logic
// maximum time that one photo stays in the panel (in ms)
var MAXTIME = 20000,
MINTIME = 8000,
FADETIME = 1500;
var FLICKR_API_PARAMS = {
apiKey: 'USE_YOUR_API_KEY_HERE',
userId: 'USE_YOUR_USER_ID_HERE',
tag: 'homepage',
perPage: '125'