I hereby claim:
- I am evilchili on github.
- I am evilchili (https://keybase.io/evilchili) on keybase.
- I have a public key whose fingerprint is 5C84 9002 AF90 54A5 B0AC 59C9 7F71 CCBA 31ED 33DD
To claim this, I am signing this object:
# -*- coding: UTF-8 -*- | |
import re | |
from unidecode import unidecode | |
from nltk.corpus import cmudict | |
# the cmu corpus contains syllable counts | |
cmu_dict = cmudict.dict() | |
# compile the regexes we'll use to try to count syllables | |
vowels = u"aeiou" |
#!/bin/bash | |
# | |
# Requirements: moreutils (see https://joeyh.name/code/moreutils/) | |
set -e | |
function buildstep { | |
# perform all your actual build things inside this function. | |
# Don't halt on errors so we can clean up after ourselves. |
I hereby claim:
To claim this, I am signing this object:
from django.db import models | |
class Record(models.Model): | |
types = models.CharField(db_index=True) | |
# ... some other stuff ... | |
@classmethod | |
def distinct_types(cls): |
from copy import deepcopy | |
from django.db import models | |
from django.db.models import Q | |
from mezzanine.pages.models import Page | |
from mezzanine.core.models import RichText | |
from django.contrib.auth.models import Group, User | |
from mezzanine.pages.managers import PageManager | |
from django.utils.timezone import now | |
from django.conf import settings | |
from django.contrib.contenttypes.models import ContentType |
input { | |
file { | |
path => "/var/log/jenkins/*" | |
type => "jenkins-server" | |
start_position => "beginning" | |
} | |
} | |
# The first filter munges the logs into discrete events. | |
filter { |
sh-3.2# puppet resource x_user fnord ensure=present | |
2013-08-28 09:36:12.919 ruby[73195:707] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[0]' | |
*** First throw call stack: | |
( | |
0 CoreFoundation 0x00007fff92f37b06 __exceptionPreprocess + 198 | |
1 libobjc.A.dylib 0x00007fff99da73f0 objc_exception_throw + 43 | |
2 CoreFoundation 0x00007fff92eea117 -[__NSPlaceholderArray initWithObjects:count:] + 119 | |
3 RubyCocoa 0x0000000105697f2c set_octypes_for_format_str + 1900 | |
4 RubyCocoa 0x0000000105696163 rbobj_to_nsobj + 595 | |
5 RubyCocoa 0x0000000105696648 rbobj_to_ocdata + 328 |
#!/bin/sh | |
USER=$1 | |
# get the shadow hash from the user entry | |
dscl . read /Users/$USER dsAttrTypeNative:ShadowHashData | tail -1 \ | |
# remove everything but hex data and spaces | |
| tr -dc '0-9a-f ' \ |
#!/usr/bin/env bash | |
# find . -maxdepth 1 -type d -printf '%T@ %p\0' | |
# -- For every directory in the current directory, print a numeric timestamp, a space, the filename, and a null | |
# | |
# sort -z -n | |
# -- Split the output on nulls (-z) and sort numerically (-n) | |
# | |
# gawk 'BEGIN {RS="\0";ORS="\0";FS=" "} NR<=3 {print $2}' | \ | |
# -- Print first (ie, oldest) three filenames in the list, separated by nulls. | |
# |
--- opencart.php 2013-01-24 09:15:54.000000000 -0800 | |
+++ /tmp/opencart.php 2013-01-24 09:16:53.000000000 -0800 | |
@@ -115,6 +115,7 @@ | |
if (!$setting['serialized']) { | |
self::$config->set($setting['key'], $setting['value']); | |
} else { | |
+ $setting['value'] = preg_replace('!s:(\d+):"(.*?)";!se', "'s:'.strlen('$2').':\"$2\";'", $setting['value'] ); | |
self::$config->set($setting['key'], unserialize( $setting['value'] ) ); | |
} | |
} |