Skip to content

Instantly share code, notes, and snippets.

Chris Fauerbach chrisfauerbach

Block or report user

Report or block chrisfauerbach

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
chrisfauerbach /
Created Aug 20, 2018
Learning python parameters. Curious how to do a mix of arguments, with *args, keyword arguments with *kwargs
### Chris. Fauerbach.
### MIT License.
### Most flexible callback method signature if you have
### required and commonly expected keyword arguments
# fn
# callback is a required argument
# *args is everything optional
# counter is a named argument with a default value
pipenv --python 3.7
pipenv install metrobus
pipenv shell
chrisfauerbach /
Created Jul 11, 2018
Generate some convincing email addresses
import string
import random
from random import randint, choice
#pip[env] install faker
from faker import Faker
fake = Faker()
View ugly_array.c
#include <stdio.h>
int main(){
unsigned long reference_number = 60000;
unsigned long phone_numbers[65535];
printf( "%lu\n", sizeof(phone_numbers));
phone_numbers[reference_number] = 1;
if ( phone_numbers[reference_number]==1){
printf("Match on = %lu\n", reference_number);
View sha256_blazing
$ echo -n “” | shasum -a 256 -
View shasum224_blazing
$ echo -n “” | shasum -a 224 -
View shasum1_blazing
$ echo -n “” | shasum -a 1 - b6b0756bb8a354ddcecc1f89d88cb69646b0c18e -
View naive.go
func nameExists(name string) {
retval boolean := false
database, err = sql.Open("postgres", "postgres://chris@localhost")
if err != nil {
r, _ := database.Query("SELECT EMAIL FROM BLACKLIST WHERE EMAIL = $1", name)
for r.Next() {
var curName string
You can’t perform that action at this time.