Skip to content

Instantly share code, notes, and snippets.

@tiwo
tiwo / miserables.ts
Created November 29, 2021 22:35 — forked from korydondzila/miserables.ts
Les Miserables graph data
export default {
"nodes": [
{ "id": "Myriel", "group": 1 },
{ "id": "Napoleon", "group": 1 },
{ "id": "Mlle.Baptistine", "group": 1 },
{ "id": "Mme.Magloire", "group": 1 },
{ "id": "CountessdeLo", "group": 1 },
{ "id": "Geborand", "group": 1 },
{ "id": "Champtercier", "group": 1 },
{ "id": "Cravatte", "group": 1 },
@tiwo
tiwo / rstudio-cc.yml
Created August 28, 2019 00:16 — forked from mdlincoln/rstudio-cc.yml
cloud-config script to setup Rstudio server and Shiny server on Ubuntu 14.04 on Digital Ocean
#cloud-config
# In order to access RStudio server via the web interface, you must log on with
# a user account that allows password access. This script does not add that user
# by default. You may either ssh as root into the server and `adduser` as
# normal, or script a user addition here:
# users:
# - name: # username #
# lock-passwd: false # allow login with password
@tiwo
tiwo / feistel.py
Created September 6, 2016 16:25 — forked from whatisaphone/feistel.py
Unlimited length feistel cipher
import hashlib
class FeistelSHA1:
rounds = 4 # 4 rounds is sufficient as long as the round function is cryptographically secure
split = 1 / 2
def __init__(self, key, rounds=rounds):
self.subkeys = [hashlib.sha1(bytes((i,)) + key).digest() for i in range(rounds)]
import urwid
import os
from xdg import DesktopEntry
def read_menus():
"""
Read the menus and return them in an array
"""
all_menus = []
@tiwo
tiwo / clients.md
Created April 16, 2012 12:09 — forked from defunkt/clients.md
A list of Gist clients.

Gist Clients

Want to create a Gist from your editor, the command line, or the Services menu? Here's how.

Editor Support