Skip to content

Instantly share code, notes, and snippets.

@benjojo
benjojo / dict.txt
Created January 31, 2014 19:37
CRC is not a good way to hash passwords
This file has been truncated, but you can view the full file.
aa
aah
aahed
aahing
aahs
aal
aalii
aaliis
aals
aardvark
### Keybase proof
I hereby claim:
* I am benjojo on github.
* I am benjojo (https://keybase.io/benjojo) on keybase.
* I have a public key whose fingerprint is 2EDA 1044 EA0E 724F 21F0 FC14 AA8F D834 567F 8B8B
To claim this, I am signing this object:
@benjojo
benjojo / chomp.go
Created June 7, 2014 22:31
consumes robot.txt files and makes a json summery of them all
package main
import (
"encoding/json"
"fmt"
"github.com/cheggaaa/pb"
"io/ioutil"
"log"
"runtime"
"strings"
<?php
$files = glob('*.wma');
usort($files, function($a, $b) {
return filemtime($a) < filemtime($b);
});
echo('<?xml version="1.0" encoding="UTF-8"?>');
?>
<rss version="2.0">
<channel>
@benjojo
benjojo / spacemail.go
Created June 28, 2014 23:24
A client for spacemail
package main
import (
"fmt"
"io/ioutil"
"net/http"
"net/url"
"strings"
)
@benjojo
benjojo / geel.py
Created May 11, 2015 19:25
~in jokes~
import pygtk
pygtk.require('2.0')
import gtk
class FirstWin:
def __init__(self):
self.win = gtk.Window(gtk.WINDOW_TOPLEVEL)
color = gtk.gdk.color_parse('#6495ED')
self.win.modify_bg(gtk.STATE_NORMAL, color)
# To change the color again, just modify it again
@benjojo
benjojo / StatStream.go
Created November 12, 2015 23:38
Publish collectd stats over a websocket, with a grep option too for scripts, Could be used for any kind of publishing of data over websockets
package main
import (
"flag"
"github.com/tuxychandru/pubsub"
"golang.org/x/net/websocket"
"io/ioutil"
"net/http"
"strings"
)
@benjojo
benjojo / gist:4697446
Created February 2, 2013 13:47
Yeah, I am pretty bored.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PHPrB64
{
class Program
{
string[] contries = new string[268] { "Afghanistan", "Albania", "Algeria", "Andorra", "Angola", "Antigua and Barbuda", "Argentina", "Armenia", "Australia", "Austria", "Azerbaijan", "Bahamas The", "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bhutan", "Bolivia", "Bosnia and Herzegovina", "Botswana", "Brazil", "Brunei", "Bulgaria", "Burkina Faso", "Burundi", "Cambodia", "Cameroon", "Canada", "Cape Verde", "Central African Republic", "Chad", "Chile", "China, People's Republic of", "Colombia", "Comoros", "Congo, (Congo – Kinshasa)", "Congo, (Congo – Brazzaville)", "Costa Rica", "Cote d'Ivoire (Ivory Coast)", "Croatia", "Cuba", "Cyprus", "Czech Republic", "Denmark", "Djibouti", "Dominica", "Dominican Republic", "Ecuador", "Egypt", "El Salvador", "Equatorial Guinea", "Eritrea", "Estonia", "Ethiopia", "Fiji", "Finland", "France", "Gabon", "Gambia, The", "Georgia", "Germany", "Ghana", "Greece", "Grenada", "Guatemala", "Guinea", "Guinea-Bissau", "Guyana", "Haiti", "Honduras
@benjojo
benjojo / wat.js
Created September 16, 2013 08:37
[][(![] + [])[+[
[+[]]
]] + ([][
[]
] + [])[+[
[!+[] + !+[] + !+[] + !+[] + !+[]]
]] + (![] + [])[+[
[!+[] + !+[]]
]] + ( !! [] + [])[+[
[+[]]