Skip to content

Instantly share code, notes, and snippets.

@devoldmx
devoldmx / osx_ramdisk.sh
Created January 4, 2016 06:47 — forked from jnschulze/osx_ramdisk.sh
Move Chrome, Safari and iTunes Cache to Ramdisk.
#!/bin/bash
# Size at the end is * 2048 where 2048 = 1 MB, so 1572864 = 768 MB
#DISK=`/usr/bin/hdiutil attach -nobrowse -nomount ram://1572864`
DISK=`/usr/bin/hdiutil attach -nobrowse -nomount ram://2097152`
/usr/sbin/diskutil erasevolume HFS+ "RamDiskCache" $DISK
CACHEDIR="/Volumes/RamDiskCache/$USER"
@devoldmx
devoldmx / iterm2.zsh
Last active August 29, 2015 14:16 — forked from wadey/iterm2.zsh
# Usage:
# source iterm2.zsh
# iTerm2 window/tab color commands
# Requires iTerm2 >= Build 1.0.0.20110804
# http://code.google.com/p/iterm2/wiki/ProprietaryEscapeCodes
tab-color() {
echo -ne "\033]6;1;bg;red;brightness;$1\a"
echo -ne "\033]6;1;bg;green;brightness;$2\a"
echo -ne "\033]6;1;bg;blue;brightness;$3\a"

Keybase proof

I hereby claim:

  • I am devoldmx on github.
  • I am devoldmx (https://keybase.io/devoldmx) on keybase.
  • I have a public key whose fingerprint is 9F73 C6C4 5794 A9ED B155 4631 ECB1 80B3 3838 C382

To claim this, I am signing this object:

@devoldmx
devoldmx / UnlockPDF.sh
Created January 12, 2015 08:53
Remove PDF encryption
# Ghostscript command to remove the encrypt from PDFs
gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=unencrypted.pdf -c .setpdfwrite -f encrypted.pdf
@devoldmx
devoldmx / TimeZone.sh
Created January 2, 2015 09:35
Display the time zone for AWS instances zones in Today Scripts extension for OSX
echo "UTC `export TZ='UTC';date +'%H:%M - %d-%b';unset TZ`"
echo "EST `export TZ='America/New_York';date +'%H:%M - %d-%b';unset TZ`"
echo "PST `export TZ='America/Los_Angeles';date +'%H:%M - %d-%b';unset TZ`"
echo "Berlin `export TZ='Europe/Berlin';date +'%H:%M - %d-%b';unset TZ`"
echo "Tokyo `export TZ='Asia/Tokyo';date +'%H:%M - %d-%b';unset TZ`"
echo "Hong Kong `export TZ='Asia/Hong_Kong';date +'%H:%M - %d-%b';unset TZ`"
echo "Sao Paulo `export TZ='America/Sao_Paulo';date +'%H:%M - %d-%b';unset TZ`"
echo "Sydney `export TZ='Australia/Sydney';date +'%H:%M - %d-%b';unset TZ`"
@devoldmx
devoldmx / image.js
Last active August 29, 2015 14:10 — forked from Marak/image.js
hook.io image hook for manipulating images using ImageMagick
/*
http://hook.io/Marak/image
*/
var gm = require('gm');
module['exports'] = function image (hook, callback) {
@devoldmx
devoldmx / PalDannas.rb
Created August 15, 2014 16:38
Tercer piso por favor!
=begin
Si llegaste aqui no siendo dannas, Good for ya!
Si eres dannas, pon tu token man or.....
=end
require 'date'
require 'koala'
class BirthdayLiker
FACEBOOK_TOKEN = 'do-you-think-im-stupid-to-leave-my-token-here'