Skip to content

Instantly share code, notes, and snippets.

@addyosmani
addyosmani / LICENSE.txt
Last active April 8, 2024 20:15 — forked from 140bytes/LICENSE.txt
Offline Text Editor in < 140 bytes (115 bytes). Powered by localStorage & contentEditable
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Copyright (C) 2014 ADDY OSMANI <addyosmani.com>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
@meadsteve
meadsteve / password_needs_rehash.php
Last active August 29, 2015 13:56
using password_needs_rehash()
<?php
$stevesSecret = "pass123";
$hashOne = password_hash($stevesSecret, PASSWORD_BCRYPT, array("cost" => 4));
$hashTwo = password_hash($stevesSecret, PASSWORD_BCRYPT, array("cost" => 12));
echo $hashOne . PHP_EOL;
echo $hashTwo . PHP_EOL;
assert('$hashOne != $hashTwo', "The two hashes should be different");
@agrueneberg
agrueneberg / client.html
Last active March 19, 2023 06:48
HMAC-SHA256 example for verifying both the data integrity and the authentication of a request in Node.js and web browsers.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>HMAC-SHA256 Example</title>
</head>
<body>
<script src="http://crypto.stanford.edu/sjcl/sjcl.js"></script>
<script>
var sharedSecret, query, signature, hmac, xhr;
@benvium
benvium / installMobileProvisionFile.sh
Created May 1, 2012 15:14
This script installs a .mobileprovision file via bash (no GUI session needed)
#!/bin/sh
# 2012 - Ben Clayton (benvium). Calvium Ltd
# Found at https://gist.github.com/2568707
#
# This script installs a .mobileprovision file without using Xcode. Unlike Xcode, it'll
# work over SSH.
#
# Requires Mac OS X (I'm using 10.7 and Xcode 4.3.2)
#
@mgdm
mgdm / jsonprint
Created April 6, 2011 16:54
Pretty-print JSON from any URL PHP's file_get_contents can reach
#!/usr/bin/php
<?php
function usage() {
echo "Usage: " . $_SERVER['argv'][0] . " [-v] URL\n";
echo "\nPretty-prints JSON output from a URL.";
echo "\n\t-v\tDecode JSON and use var_dump to display result\n";
}
@jessearmand
jessearmand / mpParse.m
Created November 23, 2010 13:59
A command line tool to parse .mobileprovision file
//
// © 2008 Eugene Solodovnykov
// http://idevblog.info/mobileprovision-files-structure-and-reading/
//
#import <Foundation/Foundation.h>
int main (int argc, const char * argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];