Skip to content

Instantly share code, notes, and snippets.

@rlemon
rlemon / autobin.js
Last active August 29, 2015 14:11
auto bin gifs.
// ==UserScript==
// @name SO Chat room gif autobinner
// @author Robert Lemon
// @version 0.0.32
// @namespace
// @description make rooms not suffer gifs
// @include http://chat.stackoverflow.com/rooms/*
// ==/UserScript==
(function(global) {
"use strict";
@igorw
igorw / rafael.php
Last active December 28, 2015 15:48
<?php
require 'vendor/autoload.php';
use MonadPHP\ListMonad;
use MonadPHP\Maybe;
function index($key) {
return function ($arr) use ($key) {
return isset($arr[$key]) ? $arr[$key] : null;
@nikic
nikic / password_hashing_api.md
Created September 12, 2012 15:04
The new Secure Password Hashing API in PHP 5.5

The new Secure Password Hashing API in PHP 5.5

The [RFC for a new simple to use password hashing API][rfc] has just been accepted for PHP 5.5. As the RFC itself is rather technical and most of the sample codes are something you should not use, I want to give a very quick overview of the new API:

Why do we need a new API?

Everybody knows that you should be hashing their passwords using bcrypt, but still a surprising number of developers uses insecure md5 or sha1 hashes (just look at the recent password leaks). One of the reasons for this is that the crypt() API is ridiculously hard to use and very prone to programming mistakes.