Skip to content

Instantly share code, notes, and snippets.

View a904guy's full-sized avatar
🆚
𝔸𝕟𝕕𝕣𝕖𝕨 ℍ𝕒𝕨𝕜𝕚𝕟𝕤

Andy Hawkins — (̖̣͕̠̬̭̞̪̐̅ỉ̭̣͈̪̠ͮs̳̳̦̞̰̜̞̳͑͌͋ͪ̃̍ ̩̘́͑ͨ̈́̎̋ͮ͊̀ñ͔̣͓̬̈ͮͦ́ͫ͐͛ͅͅo̩̦̳̠̙̗̯̺̐͆̽t̜̥̻̙̟̼̜͂ͩ͋̅̈́ ̠̦̹̟͕͕̱͉͒͋̅́͐ā̟̻̱ͦ̒̍͋ ̗̞͚ͨͩ͊͂̉ͅh͔̼͚̩͚̪̝̝ͣa̫̫̒̓ͬc̦̲̳͍̹̃ͥͯk̲͕̗̖̤̙̜͍̊e̫͎̟̼̺̫̿r͙̰̊̑̿̅ͯͅ)̪̖͇̝̮̪͖̦͆̇ͧ͑̚ a904guy

🆚
𝔸𝕟𝕕𝕣𝕖𝕨 ℍ𝕒𝕨𝕜𝕚𝕟𝕤
View GitHub Profile
@akatrevorjay
akatrevorjay / python-fuse-basic-passthrough.py
Created April 1, 2016 23:59
Python FUSE filesystem example (passthrough)
#!/usr/bin/env python
"""
Originally from: https://www.stavros.io/posts/python-fuse-filesystem/
All credit goes to the author, not me.
"""
from __future__ import with_statement
import os
import sys
@EdwardBetts
EdwardBetts / pprint_color.py
Last active March 19, 2024 18:17
Python pprint with color syntax highlighting for the console
from pprint import pformat
from typing import Any
from pygments import highlight
from pygments.formatters import Terminal256Formatter
from pygments.lexers import PythonLexer
def pprint_color(obj: Any) -> None:
"""Pretty-print in color."""
@icanhasjonas
icanhasjonas / is.d.ts
Last active September 11, 2019 12:17
is.js typescript definition file
interface TypeMethods {
arguments(value: any): boolean;
array(value: any): boolean;
boolean(value: any): boolean;
date(value: any): boolean;
error(value: any): boolean;
function(value: any): boolean;
nan(value: any): boolean;
null(value: any): boolean;
number(value: any): boolean;
@a904guy
a904guy / singleton.class.php
Last active December 19, 2015 19:29
Singleton Constructor that makes Functions based on Class names for easy access in PHP. Include it before an SPL autoloader, and you've got a shorthand method to creating class instances.IE: class db can be called like so: db(construction_vars)->method(vars)
<?php
/*
Author: Andy Hawkins
Email: YW5keUBhOTA0Z3V5LmNvbQ==
Facebook: http://fb.me/andyhawkins
HackerNews: http://hackerne.ws/user?id=a904guy
This file will allow you to create a project that will create global functions that allow you to instantly access and singleton classes from their class name
@kotnik
kotnik / small-dns-server.py
Created June 6, 2013 14:51
Example of how to create a DNS server in Python, based on Twisted libraries.
from collections import Mapping
from twisted.names import dns, server, client, cache
from twisted.application import service, internet
class MapResolver(client.Resolver):
def __init__(self, mapping, servers):
client.Resolver.__init__(self, servers=servers)