Skip to content

Instantly share code, notes, and snippets.

View cicloid's full-sized avatar
🏠
Working from home

Gustavo Barron cicloid

🏠
Working from home
View GitHub Profile
@cicloid
cicloid / README.md
Created February 11, 2023 23:33
Simple snippet for bettertouchtool and GPT on demand on MacOS

Quick instructions

  • Go to openai.com
  • Replace AQUI-VA-EL-TOKEN with your TOKEN.
  • Map in better touch tool
  • ?
  • Profit!11!!!!!!!!
@cicloid
cicloid / debian-graphicsmagick.sh
Created October 29, 2017 09:30 — forked from identityclash/debian-graphicsmagick.sh
install graphicsmagick on debian with png, jpeg, tiff, and webp support
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
### 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 November 10, 2016 18:42
I'll continue doing pushups here instead... https://github.com/cicloid/1000pushups
#!/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
#! /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 September 28, 2016 16:51
Universal ViM mode using hammerspoon
-- 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 August 15, 2019 21:01
Save all Safari Windows to a Markdown file with timestamp
#!/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 November 10, 2016 19:05
Simple sinew script to extract prices
# 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 December 12, 2015 10:39 — forked from burke/0-readme.md
# ruby-1.9.3-p385 cumulative performance patch for rbenv

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 December 10, 2012 22:32
Rebuild LaunchServices // Remove duplicate entries from "Open With..." menu on Mac OSX
sudo /System/Library/Frameworks/CoreServices.framework/Versions/Current/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user