Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Gustavo Barron cicloid

🏠
Working from home
Block or report user

Report or block cicloid

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
@cicloid
cicloid / debian-graphicsmagick.sh
Created Oct 29, 2017 — forked from identityclash/debian-graphicsmagick.sh
install graphicsmagick on debian with png, jpeg, tiff, and webp support
View debian-graphicsmagick.sh
apt-get install make git g++ gcc zlib1g zlib1g-dev libxml2 libxml2-dev -y
# https://developers.google.com/speed/webp/docs/compiling#building
cd /usr/local/src
wget http://downloads.webmproject.org/releases/webp/libwebp-0.4.3.tar.gz
tar -xvzf libwebp-0.4.3.tar.gz
cd libwebp-0.4.3
./configure
View gist:591f77f3abc07bc60201d3334d785c12
### Keybase proof
I hereby claim:
* I am cicloid on github.
* I am cicloid (https://keybase.io/cicloid) on keybase.
* I have a public key ASBLmUNSR5sBpSwsNWx13Ase7sJ0U42DxINMH1G1MdZwzQo
To claim this, I am signing this object:
@cicloid
cicloid / 1.rb
Last active Nov 10, 2016
I'll continue doing pushups here instead... https://github.com/cicloid/1000pushups
View 1.rb
#!/usr/bin/env ruby
ADDRESSES = (256 * 16777216) + (256 * 65536) + (256 * 256) + (256)
def validate_address(ipaddr)
return false if /[a-zA-Z]+/.match(ipaddr)
return false unless /\d.?{1,4}+/.match(ipaddr)
elements = ipaddr.split('.')
if elements.size == 1
ipaddr_int = ipaddr.to_i
View har2csv.rb
#! /usr/bin/env ruby
require 'rubygems'
require 'bundler/setup'
require 'oj'
require 'csv'
require 'addressable/uri'
unless ARGV.size == 2
puts 'USAGE:'
@cicloid
cicloid / vim_keybindings.lua
Created Sep 28, 2016
Universal ViM mode using hammerspoon
View vim_keybindings.lua
-- Modal ViM
local function keyCode(key)
return function() hs.eventtap.keyStroke({}, key) end
end
hs.hotkey.bind({"cmd", "alt"}, 'h', keyCode('left') , nil, keyCode('left'))
hs.hotkey.bind({"cmd", "alt"}, 'j', keyCode('down') , nil, keyCode('down') )
hs.hotkey.bind({"cmd", "alt"}, 'k', keyCode('up') , nil, keyCode('up') )
hs.hotkey.bind({"cmd", "alt"}, 'l', keyCode('right'), nil, keyCode('right') )
@cicloid
cicloid / safari2mdlog.js
Last active Aug 15, 2019
Save all Safari Windows to a Markdown file with timestamp
View safari2mdlog.js
#!/usr/bin/osascript -l JavaScript
ObjC.import('Cocoa');
function journalName() {
var currentDate = new Date(),
cMonth = pad(currentDate.getMonth() + 1, 2),
cYear = currentDate.getFullYear(),
cDay = pad(currentDate.getDate(), 2),
cHours = pad(currentDate.getHours(), 2),
@cicloid
cicloid / GasPrices.rb
Last active Nov 10, 2016
Simple sinew script to extract prices
View GasPrices.rb
# Very naive approach to scrap pricing using Sinew https://github.com/gurgeous/sinew/
get 'http://fuelgaugereport.aaa.com/import/display.php?lt=state&ls='
noko.css("tr").drop(1).each do |item|
# pull out the stuff we care about using nokogiri
row = { }
row[:state] = item.css("a").text
# Ultra naive way to extract pricing
@cicloid
cicloid / 0-readme.md
Last active Dec 12, 2015 — forked from burke/0-readme.md
# ruby-1.9.3-p385 cumulative performance patch for rbenv
View 0-readme.md

ruby-1.9.3-p385 cumulative performance patch for rbenv

This installs a patched ruby 1.9.3-p385 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.

Requirements

You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.

@cicloid
cicloid / gist:4253949
Created Dec 10, 2012
Rebuild LaunchServices // Remove duplicate entries from "Open With..." menu on Mac OSX
View gist:4253949
sudo /System/Library/Frameworks/CoreServices.framework/Versions/Current/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user
@cicloid
cicloid / gist:4219567
Created Dec 5, 2012
Fast ruby 1.9.3-p327 with performance patches
View gist:4219567
export CXX=clang CC=clang CFLAGS="-march=native -O3 -pipe -fomit-frame-pointer"
curl https://raw.github.com/gist/1688857/rbenv.sh | sh
rbenv global 1.9.3-p327-perf
You can’t perform that action at this time.