Skip to content

Instantly share code, notes, and snippets.

log = new Proxy({}, {get: (x, k) => (...pass) => console.log(`%c${pass.join(' ')}`, `color: ${k}`)});
/*
// examples:
log.tomato('I am tomato');
log.chocolate('I am chocolate');
log.noExistColor('I am no exist color');
*/
@pcp
pcp / acronyms.md
Last active August 29, 2015 14:24
acronyms

acronyms

word acronym
context ctx
Cross-Site Scripting XSS
XMLHttpRequest xhr
Document Object Model DOM
/* Whirlpool
* fork of http://www.sunsean.com/Whirlpool.js for nodejs
* (c) 2013 David (daXXog) Volm ><> + + + <><
* Released under Apache License, Version 2.0:
* http://www.apache.org/licenses/LICENSE-2.0.html
*/
/* UMD LOADER: https://github.com/umdjs/umd/blob/master/returnExports.js */
(function (root, factory) {
if (typeof exports === 'object') {
/*
I've wrapped Makoto Matsumoto and Takuji Nishimura's code in a namespace
so it's better encapsulated. Now you can have multiple random number generators
and they won't stomp all over eachother's state.
If you want to use this as a substitute for Math.random(), use the random()
method like so:
var m = new MersenneTwister();
@pcp
pcp / Antonyms.md
Last active August 29, 2015 14:21 — forked from maxtruxa/Antonyms.md

Antonym List

Note: The table headings (positive/negative) are not necessarily correct.

Positive Negative
Acquire Release
Add Remove (e.g. an item), Subtract (arithmetic)
Advance Retreat
Allocate Deallocate (correct), Free (common)
Assemble Disassemble
@pcp
pcp / Smart Codes
Last active August 29, 2015 14:20
GML Scripts
/*
From:http://gmc.yoyogames.com/?showtopic=423044
*/
/// get_move_direction(dir)
{
var dir = argument0;
dir.up = is_moving_up();
dir.down = is_moving_down();
dir.left = is_moving_left();
@pcp
pcp / bindingofisaac.cfg
Created May 3, 2014 22:10
JoyToKey config
[General]
FileVersion=51
NumberOfJoysticks=2
DisplayMode=3
UseDiagonalInput=0
UsePOV8Way=0
Threshold=20
Threshold2=20
KeySendMode=0
[Joystick 1]
@pcp
pcp / alwaysontop.ahk
Created April 21, 2014 01:42
autohotkey scripts
; always on top script
; press Ctrl+Space on aktiv window to toggle on/off
; props to: http://www.labnol.org/software/tutorials/keep-window-always-on-top/5213/
^SPACE:: Winset, Alwaysontop, , A
@pcp
pcp / twitch.bat
Created April 20, 2014 15:55
livestreamer
@echo off
::
:: livestreamer script for twitch.tv
:: url: https://github.com/chrippa/livestreamer
::
:: select high, low, medium, mobile, source
set QUALITY=medium
echo twitch.tv
echo ======================
echo.
@pcp
pcp / pm2-init.sh
Created March 11, 2014 19:24
init.d
#!/bin/bash
#
#
# description: PM2 next gen process manager for Node.js
# processname: pm2
#
### BEGIN INIT INFO
# Provides: pm2
# Required-Start: pm2
# Required-Stop: