Skip to content

Instantly share code, notes, and snippets.

View bobey's full-sized avatar

Olivier Balais bobey

View GitHub Profile
@kkonyshev
kkonyshev / Storj_Farmer_Contracts.js
Last active February 8, 2018 21:38 — forked from littleskunk/Storj_Farmer_Contracts.js
Storj_Farmer_Contracts.js
// How to run it
// Requires nodejs LTS, git, python2
// Open command line and move to the folder where this script is stored
// Edit the script and modify storage location (line 87)
// Check the startDate and EndDate and modify it if you need another timeframe (line 102 - 103)
// Stop the farmer
// Execute "npm install storj-lib"
// Execute "npm install command-line-args"
// Execute "node Storj_Farmer_Contracts.js --startDate=2017-06-01 --endDate=2017-06-05 --location=/home/user/.config/storjshare/shares/188071ba7cfd974a9e47b59e24b0737ebf845db3"
// Start the farmer
@ziogaschr
ziogaschr / debian-wvdial-ppp0-interface-autossh.markdown
Last active July 31, 2023 13:50
Reverse proxy over 3G modem (draft)

Reverse proxy over 3G modem (draft)

We will explain how to configure a cubieboard running debian as a reverese proxy. The modules that will be used are wvdial and autossh

Credits goes to:

1. http://blog.rootshell.be/2015/02/19/my-little-pwnie-box/
2. https://wiki.archlinux.org/index.php/3G_and_GPRS_modems_with_pppd
@wsargent
wsargent / docker_cheat.md
Last active August 31, 2023 12:10
Docker cheat sheet
@machty
machty / router-facelift-guide.md
Last active November 11, 2023 06:44
Guide to the Router Facelift

Ember Router Async Facelift

The Ember router is getting number of enhancements that will greatly enhance its power, reliability, predictability, and ability to handle asynchronous loading logic (so many abilities), particularly when used in conjunction with promises, though the API is friendly enough that a deep understanding of promises is not required for the simpler use cases.

@jdowning
jdowning / vagrant-clean.sh
Last active December 13, 2021 06:59
Script to clean up Ubuntu Vagrant box before packaging
#!/bin/bash
# This script zeroes out any space not needed for packaging a new Ubuntu Vagrant base box.
# Run the following command in a root shell:
#
# bash <(curl -s https://gist.github.com/justindowning/5670884/raw/vagrant-clean.sh)
function print_green {
echo -e "\e[32m${1}\e[0m"
}
@bryanchriswhite
bryanchriswhite / jshintrc
Created March 15, 2013 17:30
Angular project's .jshintrc file for use with grunt and the jshint plugin.
{
"node" : true,
"browser" : true,
"es5" : true,
"esnext" : true,
"bitwise" : true,
"camelcase": true,
"curly" : true,
"eqeqeq" : true,
"immed" : true,
@jubianchi
jubianchi / .gitconfig
Last active December 14, 2015 15:29
git stashstash
[alias]
stashstash = "!f() { STASH=$(git stash); echo \"\\033[0;31mKouroukoukou roukoukou stash stash\\033[0m\"; echo \"$STASH\"; xdg-open \"http://www.youtube.com/watch?v=LpE1bJp8-4w&feature=youtu.be&t=47s\" > /dev/null 2>&1 & }; f"
satsh = !git stashstash
@tomdale
tomdale / gist:4263171
Created December 11, 2012 23:05
Ember Data Read-Only API Proposal

Read-Only

An important feature for Ember Data is providing helpful error messages when your application tries to do something that is forbidden by the data model.

To that end, we would like for the data model to be able to mark certain records, attributes, and relationships as read-only. This ensures that we can provide errors immediately, and not have to wait for a return trip from the adapter.

This also means that the adapter does not need to handle the case where an application developer inadvertently makes changes to a record that it does not conceptually make sense to modify on the client.

Requirements

@domenic
domenic / promises.md
Last active March 31, 2024 14:07
You're Missing the Point of Promises

This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.

You're Missing the Point of Promises

Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:

getTweetsFor("domenic", function (err, results) {
 // the rest of your code goes here.
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active April 23, 2024 19:14
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'