Skip to content

Instantly share code, notes, and snippets.

@yfix
yfix / Howto.md
Created March 27, 2018 14:58 — forked from n1k0/Howto.md
CasperJS test cli hooks example

Put test1.js and test2.js into a tests/ directory, then run the suite:

$ casperjs test tests/ --pre=pre.js --includes=inc.js --post=post.js
Test file: /Users/nperriault/tmp/pre-inc/pre.js                                 
Hey, I'm executed before the suite.
Test file: /Users/nperriault/tmp/pre-inc/tests/test1.js                         
# this is test 1
Hi, I've been included.
PASS Subject is strictly true
@yfix
yfix / docker-compose.yml
Created March 12, 2018 11:44 — forked from gschmutz/docker-compose.yml
Docker Compose with Kafka Single Broker, Connect, Schema-Registry, REST Proxy, Kafka Manager
version: '2'
services:
zookeeper:
image: confluentinc/cp-zookeeper:3.3.0
hostname: zookeeper
ports:
- "2181:2181"
environment:
ZOOKEEPER_CLIENT_PORT: 2181
@yfix
yfix / 1
Created August 25, 2017 11:09
metamask test
0xa6AEA9EBa59A160d7160EBf1f7945d81D13D1E10
@yfix
yfix / addr.txt
Created August 24, 2017 13:10
mist rinkeby test addr
0x7A8a5e212853E896C5C9EdA082A62F65E99DEe29
@yfix
yfix / gh-dl-release
Created April 7, 2017 13:48 — forked from maxim/gh-dl-release
Download assets from private Github releases
#!/usr/bin/env bash
#
# gh-dl-release! It works!
#
# This script downloads an asset from latest or specific Github release of a
# private repo. Feel free to extract more of the variables into command line
# parameters.
#
# PREREQUISITES
#
@yfix
yfix / debug_log.php
Last active April 5, 2017 13:19
debug_log
<?php
/**
* @example: _debug_log($_POST)
*/
function _debug_log() {
$text = func_get_args();
if (is_array($text) || is_object($text)) {
$text = var_export($text, 1);
}
$dir = rtrim(defined('LOGS_DIR') ? LOGS_DIR : __DIR__, '/').'/';
@yfix
yfix / bamboo-to-slack.py
Created August 30, 2016 14:37 — forked from remmelt/bamboo-to-slack.py
Post an Atlassian Bamboo build result to Slack
#!/usr/bin/python
"""
Create a stage in your project, make it the last stage.
Make a task in the stage with this inline script:
#! /bin/bash
/some/path/bamboo-to-slack.py "${bamboo.planKey}" "${bamboo.buildPlanName}" "${bamboo.buildResultsUrl}"
@yfix
yfix / autoreload_supervisor.sh
Created August 24, 2016 10:38 — forked from DerMitch/autoreload_supervisor.sh
auto-reload supervisord config on changes
#!/bin/sh
# auto-reload supervisor config on a config file change
# Licensed under Public Domain
# apt-get install inotify-tools
while true; do
inotifywait --quiet --recursive --event create,close_write /etc/supervisor/
supervisorctl reread
supervisorctl update
@yfix
yfix / node-and-npm-in-30-seconds.sh
Created June 3, 2016 12:58 — forked from isaacs/node-and-npm-in-30-seconds.sh
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
@yfix
yfix / tmux-cheatsheet.markdown
Created May 23, 2016 12:05 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname