Skip to content

Instantly share code, notes, and snippets.

Emanuele Vicentini baldowl

Block or report user

Report or block baldowl

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
baldowl / gist:796353
Created Jan 26, 2011
Interactive fog session: how to get a bunch of signed URLs for European buckets with fog 0.4.1
View gist:796353
require 'active_support/time'
bucket = {|d| d.key == 'my_bucket'}
files = {|f| f.content_length > 0 &&
f.key =~ %r{client-name.*\.zip}}
expiration =
signed_urls = {|f| f.url(expiration)}
fixed_signed_url = do |su|
su.sub(%r{s3\.(.*)/my_bucket}, "my_bucket.s3.#{$1}")
baldowl /
Created Dec 27, 2011
Moving a Time Machine Disk
# disable indexing on the backup disk
sudo mdutil -i off /Volume/MyBackupDisk
# delete Spotlight's indexes
sudo rm -rf /Volume/MyBackupDisk/.Spotlight-V100
# re-enable indexing
sudo mdutil -i on /Volume/MyBackupDisk
baldowl / octokit-basic-auth-with-otp.rb
Last active Mar 6, 2017
Adjusting To GitHub's 2FA
View octokit-basic-auth-with-otp.rb
security add-generic-password \
-a my-github-login \
-s github \
-D "GitHub's OAuth2 Token" \
-T "" \
-w the-long-oauth-token
baldowl / import.rb
Created Jan 8, 2012 — forked from juniorz/import.rb
Import a blogger archive to jekyll (octopress version)
View import.rb
require 'rubygems'
require 'nokogiri'
require 'fileutils'
require 'date'
require 'uri'
# usage: ruby import.rb my-blog.xml
# my-blog.xml is a file from Settings -> Basic -> Export in blogger.
data = ARGV[0]
baldowl / gist:6542730
Last active Dec 22, 2015
Recompiling Optiboot
View gist:6542730
# Standard
make atmega1284p
# Who needs flashing LEDs?
make atmega1284p LED_START_FLASHES=0
# Let's use RX1/TX1
make atmega1284p UART=1
baldowl / Content of an ATmega1284P
Created Oct 27, 2012
Bigger AVR MCU: ATmega1284P
View Content of an ATmega1284P
Atmega chip detector.
Entered programming mode OK.
Signature = 1E 97 05
Processor = ATmega1284P
Flash memory size = 131072
LFuse = 62
HFuse = 99
EFuse = FF
Lock byte = FF
Clock calibration = 81
baldowl / gist:2900406
Created Jun 9, 2012
My First Standalone ATmega328p
View gist:2900406
# Clone of "Arduino UNO", without bootloader Uno (w/o bootloader)
baldowl / gist:1772132
Created Feb 8, 2012
Deleting EBS Snapshots with aws-sdk
View gist:1772132
require 'rubygems'
require 'active_support/time'
require 'aws-sdk'
threshold = 2.months.ago
ec2 =
select {|s| s.volume_id == 'vol-12345678' && s.start_time < threshold}.
each {|s| puts "Bye-bye #{s.description}"; s.delete}
baldowl / gist:1561249
Created Jan 4, 2012
Installing Xcode 4
View gist:1561249
open /Applications/Install\
baldowl / gist:1299102
Created Oct 19, 2011
Nginx, try_files and the Accept-Language header
View gist:1299102
location / {
root /my/web/site;
# Note (1) the '/' before $lang and (2) the lack of '/' before $uri (which
# already starts with '/').
try_files /$lang$uri /$lang$uri.html /$lang$uri/ $uri $uri.html $uri/ =404;
You can’t perform that action at this time.