Skip to content

Instantly share code, notes, and snippets.

View bdashrad's full-sized avatar
😎

Brad Clark bdashrad

😎
View GitHub Profile
@bdashrad
bdashrad / regex-test.rb
Created November 6, 2014 02:28
cidr and ip range regex tester
#!/usr/bin/env ruby
require 'netaddr'
regexfile = ARGV[0]
testfile = ARGV[1]
regex = Regexp.new(File.read(regexfile)).freeze
File.foreach(testfile) do |test|
#!/usr/bin/env perl
use strict;
use warnings;
use Net::Netmask;
use Regexp::Assemble::Compressed;
print "Enter the filename to varnishize: ";
#my $filename = <STDIN>;
@bdashrad
bdashrad / keybase.md
Created April 21, 2015 18:34
keybase.md

Keybase proof

I hereby claim:

  • I am bdashrad on github.
  • I am bdashrad (https://keybase.io/bdashrad) on keybase.
  • I have a public key whose fingerprint is 1388 24F3 A1D5 B7B2 6356 8EFB 9705 FC06 B37B 41E9

To claim this, I am signing this object:

@bdashrad
bdashrad / persist.sh
Created May 20, 2015 15:21
cron script to keep an app running
#!/usr/bin/env bash
PIDFILE="/mnt/tmp/myapp.pid"
if [ -e "${PIDFILE}" ] && (ps -u $(whoami) -opid= |
grep -P "^\s*$(cat ${PIDFILE})$" &> /dev/null); then
echo "Already running"
exit 99
fi
@bdashrad
bdashrad / pywikid.md
Created January 26, 2016 15:27
Fix pywikid on osx
@bdashrad
bdashrad / installation.md
Created February 26, 2016 02:48 — forked from guillaumevincent/installation.md
A simple guide to install PyQt5 on Mac OS X 10.9 (Maverick) and use python 3.4 on a virtualenv.

Guide to install PyQt5 on Mac OS X with python 3.4 virtualenv

Description

A simple guide to install PyQt5 on Mac OS X 10.9 (Maverick) and use python 3.4 on a virtualenv.

Requirements

  • xcode 5.1.1
  • python 3.4.0
  • Qt libraries 5.2.1
#!/usr/bin/python
import sys
def cidr_to_regex(cidr):
ip, prefix = cidr.split('/')
base = 0
for val in map(int, ip.split('.')):
base = (base << 8) | val
#!/usr/bin/env ruby
require 'json'
require 'open-uri'
phones = {
'64 gb silver att' => 'MG4X2LL%2FA',
'64 gb gray att' => 'MG4W2LL%2FA',
'64 gb gold att' => 'MG502LL%2FA'
}
#!/usr/bin/env ruby
require 'netaddr'
regexfile = ARGV[0]
testfile = ARGV[1]
regex = Regexp.new(File.read(regexfile)).freeze
File.foreach(testfile) do |test|
@bdashrad
bdashrad / interviewer_questions.md
Last active September 3, 2023 13:28
Interviewer Questions

Questions to ask your interviewer

Management

  • What problem do you solve and why would I give you money to solve it?
  • When’s the last time someone went above and beyond the call of duty at the company/on the team? What did they do?
  • What are the current goals that the company is focused on, and how does this team/role work to support hitting those goals?
  • What are the projects in this company you think are really key to its future and how would a motivated person go about getting on them?
  • What do you see as your largest technical challenge currently?
  • Pain Points beyond headcount
  • What is a project you wish a new member of the team could take on?