Skip to content

Instantly share code, notes, and snippets.

Avatar
Brewing coffee

Abe Estrada AbeEstrada

Brewing coffee
View GitHub Profile
View gist:9523016
View gist:9797292

Keybase proof

I hereby claim:

  • I am AbeEstrada on github.
  • I am AbeEstrada (https://keybase.io/AbeEstrada) on keybase.
  • I have a public key whose fingerprint is EC49 34DF 45F0 FF2C 17F9 FA44 C83D 86F9 6EFC 028B

To claim this, I am signing this object:

@AbeEstrada
AbeEstrada / gist:dc73b0525769383b7a87
Last active Aug 29, 2015
Given an array of strings, detect if there are any non-repeating array elements.
View gist:dc73b0525769383b7a87
function hasSingleElements(arr) {
if (arr.length > 0) {
var r = [];
for (var i = 0; i < arr.length; i++) {
var e = r.indexOf(arr[i]);
if (e > -1) {
r.splice(e, 1);
} else {
r.push(arr[i]);
}
View buttons.css
body, .button {
font-family: helvetica, arial, sans-serif;
font-size: 15px;
line-height: 1.5;
}
.button {
background-repeat: no-repeat;
display: inline-block;
font-family: sans-serif;
@AbeEstrada
AbeEstrada / hash.coffee
Last active Aug 29, 2015
Trello Node.js Developer Challenge - https://trello.com/jobs/developer
View hash.coffee
letters = "acdegilmnoprstuw"
hash = (s) ->
h = 7
for l in s
h = (h * 37 + letters.indexOf(l))
h
rhash = (h) ->
return rhash((h - (h % 37)) / 37) + letters[h % 37] if h > letters.length
@AbeEstrada
AbeEstrada / evaluacion.js
Created Apr 15, 2011
Javascript: Bookmarklet UANE
View evaluacion.js
var s=document.createElement('script');
s.setAttribute('src','http://jquery.com/src/jquery-latest.js');
document.getElementsByTagName('body')[0].appendChild(s);
jQuery('input[value=100]').attr('checked', 'checked');
View brew.sh
xcode-select --install
brew install bash
echo /usr/local/bin/bash >> /etc/shells
chsh -s /usr/local/bin/bash
brew install awscli git ssh-copy-id wget
View gist:dade8dc8bd46c33f47eb
# https://github.com/henrikpersson/rsub
# http://chen.do/blog/2013/09/16/editing-files-on-a-remote-server-with-sublime-text-2/
# http://www.lleess.com/2013/05/how-to-edit-remote-files-with-sublime.html
# http://leon.radley.se/2012/03/sublime-text-2-rsub/
$ ssh -R 52698:127.0.0.1:52698 user@example.org
=================================================================================
~/.ssh/config
@AbeEstrada
AbeEstrada / main.go
Last active Jun 6, 2017
coins, get the current price of BTC, ETH and LTC from the Coinbase API
View main.go
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
"time"
)