Skip to content

Instantly share code, notes, and snippets.

@thisiswei
thisiswei / wiki-100k.txt
Last active August 29, 2015 12:19 — forked from h3xx/wiki-100k.txt
Wictionary top 100,000 most frequently-used English words [for john the ripper]
#!comment: This is a list of the top 100,000 most frequently-used English words
#!comment: according to Wiktionary.
#!comment:
#!comment: It was compiled in August 2005 and coalesced into a handy list for
#!comment: use in John the Ripper.
#!comment:
#!comment:
#!comment: Pull date: Sun Jan 15 22:03:54 2012 GMT
#!comment:
#!comment: Sources:
@thisiswei
thisiswei / richhickey.md
Last active August 29, 2015 14:27 — forked from prakhar1989/richhickey.md
richhickey.md

Rich Hickey on becoming a better developer

Rich Hickey • 3 years ago

Sorry, I have to disagree with the entire premise here.

A wide variety of experiences might lead to well-roundedness, but not to greatness, nor even goodness. By constantly switching from one thing to another you are always reaching above your comfort zone, yes, but doing so by resetting your skill and knowledge level to zero.

Mastery comes from a combination of at least several of the following:

class Node(object):
def __init__(self, val):
self.val = val
self.left = None
self.right = None
def __str__(self):
s = ''
if self.left is not None:
s += str(self.left)
#include <stdio.h>
#include <stdlib.h>
char* CensorString1(char t[], char r[]) {
char *newT;
int i, j, k, occured;
i = j = k = 0;
for (i = 0; t[i] != '\0'; i++){
occured = 0;
for (j = 0; r[j] != '\0'; j++) {
def append(val, p):
last = p[-1]
p[-1] = val
insert(-1, last, p)
def insert(idx, val, iterable):
tmp = None
if idx < 0:
idx = len(iterable) + idx
for j, item in enumerate(iterable):
@thisiswei
thisiswei / create_thumbnail.py
Last active December 21, 2015 18:09
create thumbnails
import re
import logging
import Image
from StringIO import StringIO
MAX_THUMBNAIL_WIDTH = 320.
THUMBNAIL_DIR = 'thumbnails'
IMG_REG_URL = re.compile(r'"(http://s7.jcrew.com/is/image/.*?)\"')
JCREW_URL = 'http://www.jcrew.com/womens_category/shoes.jsp?iNextCategory=-1'
import Image
def create_thumbnail(old_path, new_path):
img = Image.open(old_path)
img.thumbnail((200, 200), Image.ANTIALIAS)
img.save(new_path)
@thisiswei
thisiswei / stylr.py
Last active December 19, 2015 09:09
import webapp2
import jinja2
import os
import sys
import random
sys.path.insert(0, 'libs')
import re
import time
import jinja2
import webapp2
import jinja2
import os
import sys
import random
sys.path.insert(0, 'libs')
import re
import time
import jinja2