Skip to content

Instantly share code, notes, and snippets.

View jruz's full-sized avatar
🏴

Javier Ruz jruz

🏴
View GitHub Profile
@jruz
jruz / bookmarklet.js
Last active September 3, 2015 10:18
Hide reddit .gifv posts
javascript:void%20function(){$(%22.thing%20a.title%22).each(function(){/\.gifv/.test(this.href)%26%26$(this).closest(%22.thing%22).remove()})}();
@jruz
jruz / .zshrc
Last active September 18, 2015 11:31 — forked from Morantron/eslint
Use local eslint if available if not use global
eslint () {
if [[ -f ./node_modules/.bin/eslint ]]; then
./node_modules/.bin/eslint $*
else
"${$(nvm which default)%node}eslint" $*
fi
}
@jruz
jruz / linux_usb.sh
Last active November 12, 2016 05:46
Create bootable pendrive from OSX
# convert from .iso to .img
hdiutil convert -format UDRW -o ~/path/arch.img ~/path/arch.iso
# list drives
diskutil list
# unmount pendrive
diskutil unmountDisk /dev/diskN
# copy files with progress bar (requires brew install pv)
@jruz
jruz / Imagemagick.sh
Last active October 11, 2016 11:52
Imagemagick CLI CheatSheet
# image info
indentify /path/image.jpg
# format convert
convert original.jpg converted.png
# resize
convert original.jpg -resize 100x100 converted.jpg
# gif to jpg
@jruz
jruz / transmission.sh
Last active March 31, 2016 14:47
Transmission from the CLI
#install
pacman -Sy transmission-cli transmission-remote-cli
# run the daemon
transmission-daemon
# add a file
transmission-remote -a file.torrent
transmission-remote -a file.torrent -w /mnt/external/series
@jruz
jruz / delete-google-passwords.md
Last active November 3, 2015 12:52
Delete all your passwords from Google

Delete your passwords from Google

Delete them from Chrome

go to this url chrome://settings/clearBrowserData

Select the bigining of times and mark passwords checbox

Review theres nothing on chrome://settings/passwords

@jruz
jruz / gist-importer.sh
Created November 5, 2015 10:00
Import all files in a folder to separate Gists
# Install Gist gem https://github.com/defunkt/gist
gem install gist
# Authenticate
gist --login
# cd into the folder containig the files to gist and run
ls -1 | while read file ; do echo "creating gist for: $file"; gist -p $file ; done
@jruz
jruz / vmware_arch.sh
Last active September 24, 2020 14:47
vmware arch install
# select ubunutu 64 vm
# partition drive
gdisk
1.boot-256M (mark as boot)
2.swap-2G (mark s swap)
3./-10G (ext4)
# list partitions

Keybase proof

I hereby claim:

  • I am jruz on github.
  • I am jruz (https://keybase.io/jruz) on keybase.
  • I have a public key whose fingerprint is 903C FC4A 652A 829E 11D6 CDBF CECD 4EB5 EC6A AF54

To claim this, I am signing this object:

@jruz
jruz / goog.js
Last active April 22, 2020 08:18
Translate bookmarklet
const url = window.location.href;
const from = 'de';
const to = 'en';
window.location = `https://translate.google.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sp=nmt&sl=${from}&tl=${to}&u=${url}&usg=ALkJrhgFXBxmp9mZ82ra1aJs6sIW4z3EWA`;