Skip to content

Instantly share code, notes, and snippets.

View sergiocampama's full-sized avatar
🇨🇱

Sergio Campamá sergiocampama

🇨🇱
View GitHub Profile
@romankierzkowski
romankierzkowski / 0_falsy_.js
Last active February 22, 2020 11:25
True, False and Equal in JS
/* false, 0, undefined, null, NaN, "" are false */
> Boolean(false)
false
> Boolean(0)
false
> Boolean("")
false
> Boolean(undefined)
false
@sergiocampama
sergiocampama / README.md
Last active June 24, 2022 18:04
Google Spreadsheet Cryptoscrypt

Google Spreadsheet Cryptoscrypt

Google Spreadsheet scripts for Coinbase and USD/BTC and USD/other currencies.

If you found this useful, donate XMR!: 44WvZj9zRXqgq3jHpemt8dLt29aDRQqdiK6ivxoCf3e65cdXbzBnHJyc2CdGWeGr36f5MBkqQBb61hus34nUVae4ND2PKx4

Made with love from Chile

@barnabemonnot
barnabemonnot / caterpillar.js
Created November 24, 2013 00:17
This is a Gist to accompany my article Dynamic D3.js with a simple caterpillar example (http://blablarnab.com/wordpress/2013/11/23/dynamic-d3-js-with-a-simple-caterpillar-example/). It shows how to dynamically update a force layout with D3.js, making real-time applications easier to configure by clearly separating the handling of the data with i…
var vv = window,
w = vv.innerWidth,
h = vv.innerHeight;
var svg = d3.select("#animviz")
.append("svg")
.attr("width", w)
.attr("height", h);
svg.append("g").attr("class", "links");
@kujohn
kujohn / portforwarding.md
Last active April 27, 2024 20:16
Port forwarding in Mavericks

Port Forwarding in Mavericks


Since Mavericks stopped using the deprecated ipfw (as of Mountain Lion), we'll be using pf to allow port forwarding.

####1. anchor file Create an anchor file under /etc/pf.anchors/<anchor file> with your redirection rule like:

@caged
caged / d3-server.js
Last active October 17, 2023 04:05
Directly render and serve d3 visualizations from a nodejs server.
// Start `node d3-server.js`
// Then visit http://localhost:1337/
//
var d3 = require('d3'),
http = require('http')
http.createServer(function (req, res) {
// Chrome automatically sends a requests for favicons
// Looks like https://code.google.com/p/chromium/issues/detail?id=39402 isn't
// fixed or this is a regression.
@ragingwind
ragingwind / Backend Architectures Keywords and References.md
Last active April 17, 2024 10:51
Backend Architectures Keywords and References
@sergiocampama
sergiocampama / install.sh
Created November 7, 2012 19:33
Postgresql 9.2.1 Installation instructions for Ubuntu 12.04
#Postgresql 9.2.1 Compilation instructions for Ubuntu 12.04
#This will install Postgresql 9.2.1 into /usr/local/postgresql-9.2.1
#This assumes that you have sudo provileges on the machine installing postgresql
#It should work by copying and pasting into the shell, I haven't tested it, I just summarized
#what I just did and it worked
#Get requirements
sudo apt-get install build-essential libreadline6-dev zlib1g-dev
@twosixcode
twosixcode / gist:1988097
Created March 6, 2012 18:40
Make "Paste and Indent" the default paste in Sublime Text 2
// swap the keybindings for paste and paste_and_indent
{ "keys": ["super+v"], "command": "paste_and_indent" },
{ "keys": ["super+shift+v"], "command": "paste" }
@acdha
acdha / Shell log.sh
Last active March 22, 2016 06:15
Commands needed to create an AWS RDS database parameter group which defaults to Unicode sanity: UTF-8, full collation, etc.
# Mac Homebrew command to install the RDS command-line tools
# Ubuntu users may find https://launchpad.net/~awstools-dev/+archive/awstools/ useful
brew install rds-command-line-tools
rds-create-db-parameter-group mysql-utf8 -f mysql5.1 -d "MySQL 5.1 configured for UTF-8"
rds-modify-db-parameter-group mysql-utf8 \
--parameters="name=character_set_server, value=utf8, method=immediate" \
--parameters="name=character_set_client, value=utf8, method=immediate" \
--parameters="name=character_set_results, value=utf8, method=immediate" \