Skip to content

Instantly share code, notes, and snippets.

@5tefan
5tefan / .block
Last active June 26, 2017 01:29 — forked from mbostock/.block
Solar Terminator
license: gpl-3.0
@5tefan
5tefan / replication.sh
Created March 1, 2017 06:43 — forked from rodesousa/replication.sh
Replication MySQL
#!/bin/bash
# PARAM
mysql_master=<%= @DBMY_MASTER_HOST %>
user_mysql=root
password_user_mysql=<%= @USER_ROOT_DBMY_SLAVE_PASSWORD %>
replication_user=<%= @REP_USER %>
replication_password=<%= @REP_PASSWORD %>
read -p "Etes vous sur de vouloir installer la replication ? [Y/N]" -n 1 -r
@5tefan
5tefan / bad.js
Created November 28, 2016 22:23
The worst function I've ever written
...
export function fetchAllLayers() {
return function (dispatch) {
return async.parallel(
Object.keys(Layers).map(
(layer) => { return function(cb) {
fetchLayer(layer)(dispatch).then(() => cb(null, null));
}}
)
);

Keybase proof

I hereby claim:

  • I am 5tefan on github.
  • I am 5tefan (https://keybase.io/5tefan) on keybase.
  • I have a public key whose fingerprint is ACB2 F03C 5919 56FE D14C 2A8C 34B7 CA9A 56C8 504C

To claim this, I am signing this object:

@5tefan
5tefan / reindent.md
Last active October 26, 2016 01:18 — forked from yefim/format.vim
Reindent and retab any and all files from the command line

Reindent

For a single file

vim /path/to/file.js -c 'retab | wq'

For multiple files

@5tefan
5tefan / README.md
Created October 9, 2016 02:30
kubectl setup
@5tefan
5tefan / README
Created April 22, 2016 19:47
Custom Plotlyjs bundle with Browerify for standalone script
In a dedicated directory:
1. save custom-plotly.js and package.json
2. specify the traces you want inside custom-plotly.js
3. run `git clone git@github.com:plotly/plotly.js.git`
4. run `cd plotly.js && npm install && cd ..` to install plotly's dependencies
5. run `npm install && npm run build` to create custom-plotly.min.js
6. move custom-plotly.min.js to your project and add <script src="custom-plotly.min.js" charset="utf-8"></script>
7. profit? global `Plotly` available.