Skip to content

Instantly share code, notes, and snippets.

View alanhuang122's full-sized avatar

Alan Huang alanhuang122

View GitHub Profile
(':12_Days_of_Mr_Sacks_(Guide)', '"Get off my d__n window, apparition!"')
(':A_Sparring_Bout!', 'Waiting Your Turn')
(':A_dream_about_a_corridor_lined_with_brass_mirrors', 'A dream about a corridor lined with brass mirrors 1')
(':A_maelstrom_of_scandal!', 'A maelstrom of scandal! (The Fifth City)')
(':A_maelstrom_of_scandal!', 'A maelstrom of scandal! (Upper River)')
(':Acquaintance:_the_Wry_Functionary', 'NoClear=yes')
(':Acquaintance:_the_Wry_Functionary', 'NoClear=yes')
(':Acquaintance:_the_Wry_Functionary', 'NoClear=yes')
(':Area-diving:_Casing_the_Target', 'Making your Name: What to do with the box?')
(':Bandages_and_Dust:_The_Tomb-Colonies', 'Throw an extravagant debauch for Monsieur P______')
(':A_dream_about_a_burning_river', 'A dream about a burning river 3')
(':Closest_To', 'A Shrewd Dedication')
(':Closest_To', 'A Vision of a Garden')
(':Closest_To', 'An Experiment in Form')
(':Closest_To', 'A Catalogue of Essences')
(':Closest_To', 'Consider yourself closest to Bohemians')
(':Closest_To', 'A New Leaf')
(':Closest_To', 'Sit an unpopular vigil for a departed soul')
(':Closest_To', 'Rail against the church')
(':Closest_To', 'Turn nark on a criminal friend')
from collections import defaultdict
from datetime import datetime
import json
import mwclient
import mysql.connector
import netrc
import parser
import pypandoc
import random
import re
@alanhuang122
alanhuang122 / ibi-lite.txt
Last active December 10, 2020 02:57
Sample IBI Lite barcode translation
Sourced from https://patents.google.com/patent/US7882036B1
Field # Length Offset Name
1 1 0 Indicia Version Number
2 4 1 Piece Counter
3 1 5 IBI Vendor/Model
4 3 6 PSD Serial Number
5 3 9 Postage Value (in 1/10s of a cent)
6 2 12 Intelligent Mail Service
7 6 14 HMAC Message Digest
from collections import Counter
import tweepy
consumer_key = ''
consumer_secret = ''
access_token = ''
access_token_secret = ''
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token, access_token_secret)
Storylet Title: "A Trail of Crumbs"
Appears in The Fifth City
Description: A pair of Society ladies emerge smiling from a tea shop. "Did you see her little tentacles? How daintily she grasped the cup? Just _adorable_"
The other sighs. "I was going to get one, you know. But many sellers de-beak them. Can you imagine?" The pair adopt appropriately scandalised expressions.
Requirements: [Branch hidden if failed] Key of Dreams at least 1, [Branch hidden if failed] Blemmigan Tourist no more than 0
Branches:
Branch Title: "Investigate"
Branch Title: "Host a State Dinner"
Description: Rumour has it the Captivating Princess is in Port Carnelian for the season. She would not refuse an invitation from the Governor.
Requirements: Successful Terms as Governor - at least 5, [Branch hidden if failed] Imperial Legitimacy at least 1, [Branch hidden if failed] Time Passing in Office exactly 12, [Branch hidden if failed] Banished from the Court - at least 1
Event: "A sympathetic ear"
Heartscross House gleams in red candlelight. The table groans with tureens of Mandrake soup, plates of the plumpest Blue Prophets, and bouquets of piquant fungi. Sapphire-hued wines sparkle in the mellow light. The Princess is late.
The piping tureens cool on the table. Your servants fidget. Polite conversation dries up. And then, she arrives. A young gentleman accompanying her is introduced and instantly forgotten. Tonight, she only has eyes for you. Her conversation shines brighter than the rubies in her hair; her observations merciless and her witticisms eruptive.
S
#include <openssl/ssl.h>
#include <openssl/ossl_typ.h>
#include <stdio.h>
int main(){
SSL_CTX *ctx = NULL;
ctx = SSL_CTX_new(TLS_method());
SSL_CTX_set_min_proto_version(ctx, 0);
SSL_CTX_set_max_proto_version(ctx, 0);
@alanhuang122
alanhuang122 / order.txt
Last active January 29, 2017 03:07
Decision and Order
UNITED STATES DISTRICT COURT
EASTERN DISTRICT OF NEW YORK
HAMEED KHALID DARWEESH and HAIDER SAMEER ABDULKHALEQ ALSHAWI, on behalf of themselves and others similarly situated,
Petitioners,
-against-
DONALD TRUMP, President of the United States; U.S. DEPARTMENT OF HOMELAND SECURITY ("DHS"); U.S. CUSTOMS AND BORDER PROTECTION ("CBP"); JOHN KELLY, Secretary of DHS; KEVIN K. MCALEENAN, Acting Commissioner of CBP; JAMES T. MADDEN, New York Field Director, CBP,,
Respondents,