Skip to content

Instantly share code, notes, and snippets.

// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
80EACA902134D2AC0012AD77 /* NotificationService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80EACA8F2134D2AC0012AD77 /* NotificationService.swift */; };
@sharonswli
sharonswli / ActiveRecord Cheat Sheet v1
Created March 15, 2017 07:35 — forked from jessieay/ActiveRecord Cheat Sheet v1
Active Record cheat sheet with examples of queries I've needed most so far
ActiveRecord cheat sheet / EXAMPLES
INSTALL
=======
$ gem install activerecord
in GEMFILE: gem ‘activerecord’
REQUIRE
=======
require ‘active_record’
<!DOCTYPE HTML>
<html>
<head>
<style>
body {
margin: 0px;
padding: 0px;
}
</style>
</head>
@sharonswli
sharonswli / randomStr.js
Created February 15, 2017 07:59 — forked from aseemk/randomStr.js
Random alphanumeric (base-62) strings in Node.js, cryptographically strong
var bases = require('bases');
var crypto = require('crypto');
// Returns a base-62 (alphanumeric only) string of the given length:
function randomStr(length) {
// We generate a random number in a space at least as big as 62^length,
// and if it's too big, we just retry. This is still statistically O(1)
// since repeated probabilities less than one converge to zero. Hat-tip to
// a Google interview for teaching me this technique! ;)