Skip to content

Instantly share code, notes, and snippets.

@rafaelrosafu
rafaelrosafu / node_setup.sh
Last active December 21, 2015 04:49
Node install for #hackmtl
# Create a new, non-root user
adduser node
echo "node ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
su - node
# Install git
sudo yum install git
# Install node.js through nave
cd ~
@rafaelrosafu
rafaelrosafu / get_title.js
Created January 13, 2016 23:39
Stupid bookmarklet to get page URLs in different formats. Unfortunately I lost the link for the original author, I just adapted it.
javascript:!function(){function m(a){return a.replace("<","&lt;")}function n(a,b){return b.replace(/{([a-z]+)}/g,function(b,c){return a[c]})}var a=[["www.2ality.com",{func:function(a){a.ttitle="\u201c"+a.ttitle+"\u201d by @rauschma #2ality",a.thref=a.thref+" ^ar"}}],["451research.com",{twit:"@451Research",source:"451 Research"}],["addyosmani.com",{twit:"@addyosmani",source:"addyosmani"}],["angel.co",{twit:"@angellist",source:"AngelList"}],["www.allthingsdistributed.com",{twit:"@werner",source:"Werner Voguel's Blog"}],["arstechnica.com",{twit:"@arstechnica",source:"Ars Technica"}],["aws.typepad.com",{twit:"@awscloud",source:"AWS Blog"}],["badassjs.com",{twit:"@badass_js",source:"Badass JS"}],["blog.chromium.org",{twit:"@ChromiumDev",source:"Chromium Blog"}],["blog.gardeviance.org",{twit:"@swardley",source:"Simon Wardley's Blog"}],["blog.mozilla.com",{twit:"@firefox",source:"Mozilla Blog"}],["blog.nodejs.org",{twit:"@nodejs",source:"Node JS Blog"}],["www.cloudscaling.com",{twit:"@cloudscaling",source:"Cloudscal
@rafaelrosafu
rafaelrosafu / optimize_images.sh
Last active July 18, 2017 15:21
Optimize images
sudo apt-get install optipng jpegoptim
optipng -preserve -o 0 *.png
jpegoptim --verbose --strip-all --total --preserve *.jp*
@rafaelrosafu
rafaelrosafu / .bashrc
Last active July 26, 2017 07:39
Customized bash prompt, with tweaks to git, ls, grep. Save it to ~/.bashrc, should run automatically on new Ubuntu versions, but you cannot have a .bash_profile in the home dir
#=====================================================
# Personal environment variables and startup programs
#=====================================================
# If not running interactively, don't do anything
# vagrant breaks without this
case $- in
*i*) ;;
*) return;;
esac
@rafaelrosafu
rafaelrosafu / 01_podcasts_august_2015.md
Last active October 10, 2018 19:02
Podcast list as of August 11th 2014. Just to be clear, most podcasts on this list don't have new episodes every week, some are almost gone.
@rafaelrosafu
rafaelrosafu / canada.md
Last active November 16, 2018 13:21
Imigrando e vivendo no Canadá - um guia nada imparcial
@rafaelrosafu
rafaelrosafu / podcast_editing.md
Last active April 20, 2021 18:08
Podcast editing recipe

Step by step

  1. Record the audio with Skype Call Recorder
  2. Save a copy of the audio file in a temporary directory
  3. Open the file in Garageband
  4. Remove extra audio from the beginning and the end
  5. Delete any problems in audio
  6. Apply the Compressor filter (manual config, threshold: ~ 30 dB, ratio: 30: 1, Attack: 10ms, gain: 4dB)
  7. Export to AIFF (uncompressed)
  8. Open the file in Audacity
  9. Use the filter Truncate Silence on the whole file (Level: -30dB, duration 0.3s, truncate to: 0.15s, compression: 50)
@rafaelrosafu
rafaelrosafu / python_ref.md
Last active April 1, 2023 18:17
Referências para aprender Python

Referências para aprender Python

Me perguntaram dicas sobre como aprender Python para quem nunca programou antes. Não é a minha especialidade, mas graças aos meus amigos no Twitter e no Facebook, consegui juntar uma lista de referências que espero ser útil.

Se alguém tiver mais referências, por favor, deixem comentários ou me mande uma mensagem em @rafaelrosafu.

Livros