Skip to content

Instantly share code, notes, and snippets.

View Neppord's full-sized avatar

Samuel Ytterbrink Neppord

View GitHub Profile
@Neppord
Neppord / sibling.sh
Created March 22, 2013 14:13
Moduels in BASH
echo $BASH_SOURCE
@Neppord
Neppord / package.json
Created May 20, 2013 17:29
testing out cucumber js
{
"private": true
, "name": "mtp"
, "description": "My test project"
, "dependencies": {
"cucumber": "*"
}
}
@Neppord
Neppord / RAINBOWlog.js
Last active August 29, 2015 13:57 — forked from zikes/RAINBOWlog.js
(function(){
var log = console.log;
var css = 'background: linear-gradient(to right, red, yellow, lime, aqua, blue, fuchsia, red); color: white; font-weight: bold; text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;';
function gen_css(){
return css + "font-size: " + (9 + ((Math.random() * 20) << 0)) + "px;"
}
console.log = function(str) {
var args = Array.prototype.slice.call(arguments);
@Neppord
Neppord / patch.js
Created March 16, 2014 01:36
ltc patch
(function (patched) {
if (!patched) {
window.patched = true;
console.log("patched")
}
})(patched)
module.exports = {
users: [
{"name": "first_test_user", "password": "this_is_ofc_a_hash_with_salt_etc"}
],
products: [
{"name": "awesome product (tm)", "id": "very unique id"}
]
}
@Neppord
Neppord / compose
Created May 10, 2015 16:13
compose alias
#! /usr/bin/env bash
set -e
(
__DIR="$PWD"
while [ "$__DIR" != "/" ] && [ ! -e "${__DIR}/docker-compose.yml" ]; do
__DIR=`dirname "$__DIR"`
done
cd "$__DIR"
docker-compose $*
@Neppord
Neppord / conditions.js
Created March 2, 2017 12:15
my own notes in discussing style guides
const x = true || false, y = 1, z = 2;
function () {
return x ? y : z;
}
function () {
if (x) {
return y;
}