Skip to content

Instantly share code, notes, and snippets.

View evanradcliffe's full-sized avatar

Evan Radcliffe evanradcliffe

  • Philadelphia, USA
  • 11:30 (UTC -04:00)
View GitHub Profile
@evanradcliffe
evanradcliffe / username.py
Created June 2, 2016 16:02 — forked from beefy/username.py
a script to help find a github username
#!/usr/bin/env python2.7
import urllib2
for line in open('/usr/share/dict/cracklib-small','rb'):
try:
urllib2.urlopen('https://github.com/'+line.replace('\n',''))
except urllib2.HTTPError as e:
if e.code == 404:
print line.replace('\n','')
@evanradcliffe
evanradcliffe / lyricsearch.py
Created July 8, 2016 15:55
Search Genius for the current playing Spotify song.
#!/usr/bin/env python
import webbrowser
import dbus
session_bus = dbus.SessionBus()
spotify_bus = session_bus.get_object("org.mpris.MediaPlayer2.spotify",
"/org/mpris/MediaPlayer2")
spotify_properties = dbus.Interface(spotify_bus,
"org.freedesktop.DBus.Properties")
@evanradcliffe
evanradcliffe / client.c
Created July 26, 2017 12:59
Client file from class
#include "csapp.h"
/* usage: ./echoclient host port */
int main(int argc, char **argv)
{
int clientfd, port;
char *host, buf[MAXLINE];
rio_t rio;
host = argv[1];
port = atoi(argv[2]);
@evanradcliffe
evanradcliffe / server.c
Last active July 26, 2017 13:06 — forked from beefy/client.c
server file from class
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "csapp.c"
void echo(int connfd)
{
size_t n;
char buf[MAXLINE];
rio_t rio;
@evanradcliffe
evanradcliffe / settings.json
Created January 15, 2022 18:39
Windows terminal cyberpunk theme
// This file was initially generated by Windows Terminal 1.3.2651.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",