Skip to content

Instantly share code, notes, and snippets.

View mschenck's full-sized avatar

Michael Schenck mschenck

  • Pittsburgh, PA
  • 02:31 (UTC -04:00)
View GitHub Profile
@feyhi
feyhi / leetcode_crawler.py
Last active December 26, 2023 00:34
Get your Leetcode submission history
import time
import requests
import datetime
import cPickle as pickle
from bs4 import BeautifulSoup
LOGIN = "login"
PASSWD = "password"
LOGIN_URL = "https://leetcode.com/accounts/login/"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define MAXBUCKETS 2048
#define PRINT_DISTRIBUTION 1
static unsigned int occ[MAXBUCKETS];
char line[1024];
unsigned test_hash(const unsigned char *s, int len)
@joaopizani
joaopizani / .screenrc
Created May 17, 2012 11:55
A killer GNU Screen Config
# the following two lines give a two-line status, with the current window highlighted
hardstatus alwayslastline
hardstatus string '%{= kG}[%{G}%H%? %1`%?%{g}][%= %{= kw}%-w%{+b yk} %n*%t%?(%u)%? %{-}%+w %=%{g}][%{B}%m/%d %{W}%C%A%{g}]'
# huge scrollback buffer
defscrollback 5000
# no welcome message
startup_message off
@telamon
telamon / rdhcpd.rb
Created May 20, 2011 23:58
Pure ruby DHCP server
' Copyright (c) 2007, Tony Ivanov
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.