Skip to content

Instantly share code, notes, and snippets.

  1. Plain Strings (207): foo
  2. Anchors (208): k$
  3. Ranges (202): ^[a-f]*$
  4. Backrefs (201): (...).*\1
  5. Abba (169): ^(.(?!(ll|ss|mm|rr|tt|ff|cc|bb)))*$|^n|ef
  6. A man, a plan (177): ^(.)[^p].*\1$
  7. Prime (286): ^(?!(..+)\1+$)
  8. Four (199): (.)(.\1){3}
  9. Order (198): ^[^o].....?$
  10. Triples (507): (^39|^44)|(^([0369]|([147][0369]*[258])|(([258]|[147][0369]*[147])([0369]*|[258][0369]*[147])([147]|[258][0369]*[258])))*$)
@epoch
epoch / promises.md
Created April 5, 2017 13:56 — forked from domenic/promises.md
You're Missing the Point of Promises

This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.

You're Missing the Point of Promises

Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:

getTweetsFor("domenic", function (err, results) {
 // the rest of your code goes here.
var gulp = require('gulp');
var clean = require('gulp-clean');
var jshint = require('gulp-jshint');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var imagemin = require('gulp-imagemin');
var bases = {
app: 'app/',
@epoch
epoch / introrx.md
Created August 29, 2016 15:24 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@epoch
epoch / 0main.md
Created August 13, 2016 07:24 — forked from canton7/0main.md
Local versions of tracked config files

How to have local versions of tracked config files in git

This is a fairly common question, and there isn't a One True Answer.

These are the most common techniques:

If you can modify your application

@epoch
epoch / heroku_deploy.md
Created August 1, 2016 00:43
Heroku Deployment Guide

Heroku sinatra deploy guide

First some setup for our files, locally.

  1. Create a new file in the project root called Gemfile
  2. You must list the gems that your project uses in this file. example:
source 'https://rubygems.org'
@epoch
epoch / file1.txt
Last active September 8, 2016 13:27
some very long description to make all things not so easy for everyone in this chaotic world
updated file contents sdfsdsdf sdsdf
sdfsdf sdfsfsdf werwer
sdfsdf sdfsdfsdf wrweer wewewe wewrwer wewerdsfsf sdsdfsdf
sdfsdf
@epoch
epoch / Gemfile
Created January 27, 2016 16:01 — forked from cblunt/Gemfile
Configure Carrierwave for Amazon S3 Storage and Heroku
# ...
gem 'carrierwave'
gem 'fog', '~> 1.0.0' # Need to specify version, as carrierwave references older (0.9.0) which doesn't allow configuration of Rackspace UK Auth URL
@epoch
epoch / example
Created September 28, 2015 02:51
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi