Skip to content

Instantly share code, notes, and snippets.

@quilime
quilime / ga-fest-talks-wordcount.txt
Last active May 19, 2023 20:16
Gray Area Festival Video Wordcount, generated from talks and presentation transcripts from 2015-2022
51793 the
47605 and
37958 of
31111 to
29723 that
28749 i
28566 a
24211 you
22136 it
20976 in
@quilime
quilime / ichat.md
Last active April 23, 2023 04:34
explore iChats on Mac OS

Accessing iChat's on MacOS

sqlite3 ~/Library/Messages/chat.db

notable tables:

  • attachment – metadata and storage location
  • chat – a collection of your messages (both direct and group)
@quilime
quilime / tsws
Last active January 15, 2022 07:31 — forked from dfletcher/tsws
Totally simple web server using Bash and netcat (nc)
#!/bin/bash
# --------------------------------
# Totally Simple Web Server (TSWS)
# --------------------------------
#
# (c) 2015 Dave Fletcher
# All Rights Reserved
#
# This is free and unencumbered software released into the public domain.
@quilime
quilime / msort.php
Created February 19, 2011 20:26
Simple Multi-Dimensional Key Sort
<?php
/*
A simple multidimensional key-value sorting function, allowing you to sort an
array by a multidimensional key without having to write callback functions.
This concept appears to be missing in PHP, this function allows for easy array
sorting. Works with both strings and numbers, case sensitive and doesn't
drop/mash keys. PHP 5.3.0 > only.
via: http://projects.westhost.com/contest/php/function/simple-multi-dimensional-key-sort/151
@quilime
quilime / Expiration.sol
Created May 12, 2018 14:56
Simple License Expiration Example
pragma solidity ^ 0.4.4;
// *****************************************************************
// DEMO!! UNVETTED CODE! DO NOT DEPLOY!!!
// Please seek expert guidance and perform a solidity security audit
// before using it in financially important code.
// *****************************************************************
contract ArtLicenseExpiration {
const key = 'z){@UWzw*+TRt7Xu3c-(qL_.~MNCN3prv(!{'; // secret
const encode = function encode(key, data) {
return new Buffer(xorStrings(key, data), 'utf8').toString('base64');
}
const decode = function decode(key, data) {
data = new Buffer(data, 'base64').toString('utf8');
return xorStrings(key, data);
}

Keybase proof

I hereby claim:

  • I am quilime on github.
  • I am gld (https://keybase.io/gld) on keybase.
  • I have a public key whose fingerprint is 9044 71A8 B484 7E6D 9745 23DC 4D10 8263 BE57 EC8E

To claim this, I am signing this object:

@quilime
quilime / triangle.frag
Last active December 22, 2015 03:09
GLSL Triangle function
// via "Einstienstien" - by Dave Hoskins, on Shadertoy
// http://glsl.heroku.com/e#10662.0
#ifdef GL_ES
precision mediump float;
#endif
uniform vec2 resolution;
float col = 0.0; // Start black.
@quilime
quilime / htmlwordcount.py
Last active December 16, 2015 10:58
Count words from html
import nltk
import string
from urllib import urlopen
from itertools import imap
url = "http://google.com"
html = urlopen(url).read()
text = nltk.clean_html(html)
text_noPunc = text.translate(string.maketrans("",""), string.punctuation)
words = text_noPunc.split()