Skip to content

Instantly share code, notes, and snippets.

View authorisation.pro
type_person(bigco_it_guy).
type_person(bigco_big_boss).
type_person(bigco_web_manager).
type_person(bigco_web_worker_1).
type_person(bigco_web_worker_2).
type_person(bigco_web_worker_3).
type_person(bigco_mobile_manager).
type_person(bigco_mobile_worker_1).
type_person(bigco_mobile_worker_2).
type_person(bigco_mobile_worker_3).
@naomik
naomik / after.php
Last active Aug 29, 2015
static variables in functions make things nice sometimes.
View after.php
<?php get_header() ?>
<div class="row">
<?php if (have_posts()) {
// dividers helper
$display_dividers = function() {
static $i = 0;
$i++;
@naomik
naomik / restore.php
Last active Aug 29, 2015
Haters gonna hate
View restore.php
#!/usr/bin/env php
<?php
// set descriptors
$desc = array(
0 => array("file", "php://stdin", "r"),
1 => array("pipe", "w"),
2 => array("pipe", "w")
);
@naomik
naomik / uninstall-GHfM.sh
Created Apr 24, 2014 — forked from lukehefson/uninstall-GHfM.sh
Completely uninstall GitHub for Mac
View uninstall-GHfM.sh
#!/bin/bash
function remove_dir () {
rm -rf "$1_"
if [ -d "$1" ]
then
mv "$1" "$1_"
fi
}
View mine.js
// ------------------------------------------------------------------
// function is now reusable
// better stacktrace errors because it has a name
// much flatter code
function fadeOutAndRemove(event) {
var $elem = $(this);
$elem.fadeOut(300, function() {
$elem.remove();
});
}
View exciter.js
var stream = require("stream");
var Exciter = function Exciter() {
stream.Transform.call(this);
};
Exciter.prototype = Object.create(stream.Transform.prototype, {
constructor: {
value: Exciter
}
View eureka.js
// require stream
var stream = require('stream');
// Messenger
var Messenger = function Messenger() {
stream.Transform.call(this);
this._buffer = "";
this._delimiter = ".";
this.on("end", this._onEnd.bind(this));
View doubler.js
// require stream
var stream = require("stream"),
util = require("util");
// Uppercaser
var Uppercaser = function Uppercaser() {
stream.Transform.call(this);
};
util.inherits(Uppercaser, stream.Transform);
View fuckutil.js
// require stream
var stream = require('stream');
// Uppercaser stream
var Uppercaser = function Uppercaser() {
stream.Transform.call(this);
};
Uppercaser.prototype = Object.create(stream.Transform.prototype, {constructor: {value: Uppercaser}});
@naomik
naomik / candybox2.txt
Last active Dec 26, 2015
was able to beat this one too quickly
View candybox2.txt
bool candiesThrownGotChocolateBar=true, bool candyBoxBoxOpened=true, bool castleBigRoomHovenHappy=true, bool castleRoom2LitFire=true, bool castleRoom2TookObject=true, bool castleTowerFirstVisitDone=true, bool castleTowerPStoneDone=true, bool castleTowerLStoneDone=true, bool castleTowerAStoneDone=true, bool castleTowerYStoneDone=true, bool castleTowerTookTalkingCandy=true, bool castleKilledNougatMonster=true, bool cellarDone=true, bool dragonDone=true, bool dragonUnlockedCyclops=true, bool forgeFoundLollipop=true, bool forgeBoughtWoodenSword=true, bool forgeBoughtIronAxe=true, bool forgeBoughtPolishedSilverSword=true, bool forgeBoughtLightweightBodyArmour=true, bool forgeBoughtScythe=true, bool fortressRoom1ChestFound=true, bool fortressRoom3ChestFound=true, bool fourthHouseFoundLollipopOnCupboard=true, bool gameDebug=false, bool gameInvertedColors=false, bool lighthousePuzzleDone=false, bool lollipopFarmPlant1LollipopButtonUnlocked=true, bool lollipopFarmPlant10LollipopsButtonUnlocked=true, bool lollipopFarmP
You can’t perform that action at this time.