Skip to content

Instantly share code, notes, and snippets.

View cefigueiredo's full-sized avatar

Carlos Figueiredo cefigueiredo

  • Montreal, Quebec
View GitHub Profile
@cefigueiredo
cefigueiredo / binary.rb
Created July 14, 2023 20:43 — forked from xfbs/binary.rb
Ruby: convert string to binary form and back (one liners
# not the most efficient way,
# but you get the idea.
str = "meow"
# convert string to binary
bin = str.bytes.map{|d| d.to_s(2)}.map{|b| b.rjust(8, '0')}.join
puts bin
# and convert it back to a string
@cefigueiredo
cefigueiredo / css-sort-arrow-icon.html
Last active September 23, 2020 21:20
Snippet for resizable sort arrows icons made with CSS only
<style type="text/css">
.sort-by-asc
{
left: 0em;
display: inline-block;
position: absolute;
width: 0;
height: 0;
border: solid 0.25em transparent;
margin: 0.1em 0em 0em 0.2em;
@cefigueiredo
cefigueiredo / gist:a830cd2476e9752e356f9c22032a09e1
Created March 24, 2020 23:48
OpenSSL compatible with Ruby <= 2.3 on OSX Mojave
https://github.com/rvm/rvm/issues/4781#issuecomment-564598437
cd /usr/local/src # or any folder chosen to download the tarball
curl -O https://www.openssl.org/source/openssl-1.0.2t.tar.gz
tar xzf openssl-1.0.2t.tar.gz
cd openssl-1.0.2t
./Configure # pick the right compiler for os. Ex: darwin64-x86_64-cc
make
sudo make install
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle'
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle'
});
@cefigueiredo
cefigueiredo / gist:8069f3144934aa92ca1c
Created October 13, 2014 21:12
Reordenar commits
http://gitready.com/advanced/2009/03/20/reorder-commits-with-rebase.html
git log --graph --all --pretty=format:"%C(yellow)%h%Creset%d %Creset%s %C(bold blue)[%an]"
https://github.com/jruby/jruby-rack/issues/48

rage-quit support for bash

HOW TO INSTALL

Put flip somewhere in your $PATH and chmod a+x it.

Copy fuck into ~/.bashrc.