Skip to content

Instantly share code, notes, and snippets.

View danibram's full-sized avatar
🏠
Hack hack hack hack

Daniel Biedma danibram

🏠
Hack hack hack hack
View GitHub Profile
@danibram
danibram / gist:ec7b34e22c90e7aa03a0
Last active September 3, 2015 20:14 — forked from saetia/gist:1623487
Clean Install – OS X 10.11 El Capitan Developer Preview 2

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
@danibram
danibram / fix_hosts.sh
Last active September 23, 2015 07:46
Fix hosts file from corruption
#!/bin/sh
# Solution found here (run with sudo):
# http://superuser.com/questions/866086/localhost-aliases-in-mac-os-x-mysteriously-stopped-working
tr '\015' '\012' < /etc/hosts > /tmp/hosts.$$
mv /etc/hosts /etc/hosts.bad
mv /tmp/hosts.$$ /etc/hosts
chown root:wheel /etc/hosts
chmod 644 /etc/hosts
setw -g aggressive-resize 0
#Reload tmux conf
bind-key r source-file ~/.tmux.conf \; display "Config reloaded!"
# Remap prefix to Control + a
# set -g prefix §
set -g prefix C-a
unbind C-b
@danibram
danibram / ElasticSearch.sh
Created February 3, 2016 08:48 — forked from ricardo-rossi/ElasticSearch.sh
Installing ElasticSearch on Ubuntu 14.04
#!/bin/bash
### USAGE
###
### ./ElasticSearch.sh 1.7 will install Elasticsearch 1.7
### ./ElasticSearch.sh will fail because no version was specified (exit code 1)
###
### CLI options Contributed by @janpieper
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch
@danibram
danibram / jquery-qrcode.js
Last active October 19, 2016 08:13
jquery qrcode
(function(r){r.fn.qrcode=function(h){var s;function u(a){this.mode=s;this.data=a}function o(a,c){this.typeNumber=a;this.errorCorrectLevel=c;this.modules=null;this.moduleCount=0;this.dataCache=null;this.dataList=[]}function q(a,c){if(void 0==a.length)throw Error(a.length+"/"+c);for(var d=0;d<a.length&&0==a[d];)d++;this.num=Array(a.length-d+c);for(var b=0;b<a.length-d;b++)this.num[b]=a[b+d]}function p(a,c){this.totalCount=a;this.dataCount=c}function t(){this.buffer=[];this.length=0}u.prototype={getLength:function(){return this.data.length},
write:function(a){for(var c=0;c<this.data.length;c++)a.put(this.data.charCodeAt(c),8)}};o.prototype={addData:function(a){this.dataList.push(new u(a));this.dataCache=null},isDark:function(a,c){if(0>a||this.moduleCount<=a||0>c||this.moduleCount<=c)throw Error(a+","+c);return this.modules[a][c]},getModuleCount:function(){return this.moduleCount},make:function(){if(1>this.typeNumber){for(var a=1,a=1;40>a;a++){for(var c=p.getRSBlocks(a,this.errorCorrectLevel),d=new t,b=0,e=0;e<c.
@danibram
danibram / reselect.js
Last active November 2, 2016 10:35
An AMD reselect version [https://github.com/reactjs/reselect]
define(['exports'], function (exports) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.defaultMemoize = defaultMemoize;
exports.createSelectorCreator = createSelectorCreator;
exports.createStructuredSelector = createStructuredSelector;
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.18039216101169586</real>

Keybase proof

I hereby claim:

  • I am danibram on github.
  • I am danibram (https://keybase.io/danibram) on keybase.
  • I have a public key ASCC_wzM_E88-IMuDm7ccJZHJIppgDbuLJJw_OpUoqjF9wo

To claim this, I am signing this object:

Name Category Consumption Description
Arándanos frutas free 1 ración por comida y dejar pasar 2,5-3h entre cada una
Aguacate frutas limited 30g por toma
Frambuesas frutas free 1 ración por comida y dejar pasar 2,5-3h entre cada una
Fresas frutas free 1 ración por comida y dejar pasar 2,5-3h entre cada una
Fruta de la pasión frutas free 1 ración por comida y dejar pasar 2,5-3h entre cada una
Kiwi frutas free 1 ración por comida y dejar pasar 2,5-3h entre cada una
Lima frutas free 1 ración por comida y dejar pasar 2,5-3h entre cada una
Limón frutas free 1 ración por comida y dejar pasar 2,5-3h entre cada una
Mandarina frutas free 1 ración por comida y dejar pasar 2,5-3h entre cada una
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>Fodmapscsv</title>
</head>
<body>