Skip to content

Instantly share code, notes, and snippets.

View albohlabs's full-sized avatar

Daniel Pfefferkorn albohlabs

View GitHub Profile
* general fp and js
* Oh Composable World https://www.youtube.com/watch?v=SfWR3dKnFIo
* Why Why Functional Programming Matters Matters http://raganwald.com/2014/12/20/why-why-functional-programming-matters-matters.html
* Functional Programming for JavaScript People https://medium.com/@chetcorcos/functional-programming-for-javascript-people-1915d8775504#.3sya7ojxb
* article series about fp in general https://medium.com/javascript-scene/composing-software-the-book-f31c77fc3ddc
* Curry and Function Composition https://medium.com/javascript-scene/curry-and-function-composition-2c208d774983
* Handling null and undefined in JavaScript https://medium.com/javascript-scene/handling-null-and-undefined-in-javascript-1500c65d51ae
* Lenses https://medium.com/javascript-scene/lenses-b85976cb0534
* book about fp in general https://mostly-adequate.gitbook.io/mostly-adequate-guide/
* funny eccentric video series about the books :ausrufezeichen: https://www.youtube.com/watch?v=h_tkIpwbsxY&list=PLK_hdtAJ4KqX0JOs_KMA

Keybase proof

I hereby claim:

  • I am albohlabs on github.
  • I am alboh (https://keybase.io/alboh) on keybase.
  • I have a public key ASC_h_lIaTJVBtQnkFHtNXV6Jm3ivRhXI3FMKbvVvib6SQo

To claim this, I am signing this object:

// https://raw.githubusercontent.com/donnut/typescript-ramda/master/ramda.d.ts
// https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/master/lodash/lodash.d.ts
declare namespace fp {
interface Dictionary<T> {
[index: string]: T;
}
interface CurriedFunction1<T1, R> {
@albohlabs
albohlabs / hack.sh
Created March 31, 2012 13:10 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
(function($) {
var o = $( {} );
$.each({
on: 'subscribe',
trigger: 'publish',
off: 'unsubscribe'
}, function( key, api ) {
$[api] = function() {
o[key].apply( o, arguments );
YUI.add("my-widget", function (Y) {
var Node = Y.Node,
getClassName = Y.ClassNameManager.getClassName,
i, j,
baseClasses = ["_CLASS", "title", "loader", "viewer", "tweet", "ui", "label", "input", "button", "error"],
templates = ["_TEMPLATE", "&lt;hgroup class={titleclass}>&lt;h1>{title}&lt;/h1>&lt;h2>{subtitle}&lt;span>{term}&lt;/span>&lt;/h2>&lt;/hgroup>", "&lt;div class={loaderclass}>loading...&lt;/div>", "&lt;div class={viewerclass}>&lt;/div>", "&lt;article>&lt;a href={userurl} title={username}>&lt;img src={avatar} alt={username} />&lt;h1>{username}&lt;/h1>&lt;/a>&lt;p>{text}&lt;/p>&lt;/article>", "&lt;div class={uiclass}>&lt;/div>", "&lt;label class={labelclass}>{labeltext}&lt;/label>", "&lt;input class={inputclass} />", "&lt;button class={buttonclass}>{buttontext}&lt;/button>", "&lt;p class={errorclass}>{message}&lt;/p>"];
//constructor
function MyWidget(config) {
var scr = document.createElement('script');
// When the script runs, it'll pass the data into the formatCurrency function. Excellent.
scr.src = 'http://openexchangerates.org/latest.json?callback=formatCurrency';
document.body.appendChild(scr);
@albohlabs
albohlabs / gist:1989352
Created March 6, 2012 22:14
PHP: password en- & decryption
# http://stackoverflow.com/questions/1289061/best-way-to-use-php-to-encrypt-and-decrypt
$key = 'password to (en/de)crypt';
$string = ' string to be encrypted '; // note the spaces
# To Encrypt:
$encrypted = base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, md5($key), $string, MCRYPT_MODE_CBC, md5(md5($key))));
# To Decrypt:
$decrypted = rtrim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, md5($key), base64_decode($encrypted), MCRYPT_MODE_CBC, md5(md5($key))), "\0");
# fingerprint | get OS
nmap -O
# fingerprint with port
nmap -O -p 22,80
# full TCP scan
nmap -sT -p1-65535
# full UDP scan
@albohlabs
albohlabs / gist:1989322
Created March 6, 2012 22:09
CLI: gitosis
# initial new git
git clone git@83.169.20.139:gitosis-admin.git
git push
# add to server
git remote add origin git@83.169.20.139:bsad.git
git push origin master