Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Variable assignment for legibility. The file content should be
# in the form of:
# username, password
filename=$1
# If the file exists, loop through it and start making accounts
# else just quit and display the help.
if [ -e $filename ]
@JamesTheBard
JamesTheBard / .vimrc
Created December 5, 2014 05:54 — forked from anonymous/.vimrc
set modeline
set ts=4
set sts=4
set et
set sw=4
set ruler
set number
set nofoldenable
set scrolloff=10

Keybase proof

I hereby claim:

  • I am jamesthebard on github.
  • I am jamesthebard (https://keybase.io/jamesthebard) on keybase.
  • I have a public key whose fingerprint is DE0D 383B F8C7 656E 6926 A19F 17FB EA43 AF75 23D5

To claim this, I am signing this object:

@JamesTheBard
JamesTheBard / md5sum.py
Created March 17, 2015 17:07
Python md5sum quickie
from __future__ import print_function
import hashlib
import sys
def md5Checksum(filePath):
with open(filePath, 'rb') as fh:
m = hashlib.md5()
while True:
data = fh.read(8192)
if not data:
Starting from '10'...
5: 0.722471690979458
10: 0.7071067811865475
15: 0.7071067811865475
20: 0.7071067811865475
Starting from '100,000'...
5: 3125.00005328125
10: 97.65795665907389
20: 0.7071072944225515
@JamesTheBard
JamesTheBard / priv.pl
Last active August 29, 2015 14:23
Privilege users parsing script
#!/bin/perl
use strict;
use warnings;
use File::Spec;
our %file_path = (
"PASSWD" => "etc/passwd",
"GROUP" => "etc/group",
"SUDOERS" => "etc/sudoers",
1 jweatherly@jweatherly-Precision-T5610 ~/Code/sergeant % python client.py :(
('127.0.0.1', 12345)
('ECDHE-RSA-AES256-GCM-SHA384', 'TLSv1/SSLv3', 256)
{'issuer': ((('countryName', u'US'),),
(('stateOrProvinceName', u'South Carolina'),),
(('localityName', u'Charleston'),),
(('organizationName', u'Internet Widgits Pty Ltd'),)),
'notAfter': 'Jul 18 18:11:30 2016 GMT',
'notBefore': u'Jul 19 18:11:30 2015 GMT',
'serialNumber': u'CF9728D544401B7A',
@JamesTheBard
JamesTheBard / gist:33567801b63aa8d96c34
Created September 22, 2015 00:54
Error log for passenger build (5.0.18/Solaris 11.2/Ruby 1.9.3)
In file included from ext/boost/system/system_error.hpp:14:0,
from ext/boost/thread/exceptions.hpp:22,
from ext/boost/thread/pthread/thread_data.hpp:10,
from ext/boost/thread/thread_only.hpp:17,
from ext/boost/thread/thread.hpp:12,
from ext/boost/thread.hpp:13,
from ext/oxt/thread.hpp:28,
from ext/common/agent/UstRouter/UstRouterMain.cpp:30:
ext/boost/system/error_code.hpp:222:36: warning: ‘boost::system::posix_category’ defined but not used [-Wunused-variable]
static const error_category & posix_category = generic_category();
@JamesTheBard
JamesTheBard / stdout_and_stderr.log
Created September 23, 2015 04:39
Passenger compile run (Solaris 11.2/Ruby 1.9.3/Passenger 5.0.18)
Welcome to the Phusion Passenger Apache 2 module installer, v5.0.18.
This installer will guide you through the entire installation process. It
shouldn't take more than 3 minutes in total.
Here's what you can expect from the installation process:
1. The Apache 2 module will be installed for you.
2. You'll learn how to configure Apache.
3. You'll learn how to deploy a Ruby on Rails application.
@JamesTheBard
JamesTheBard / stdout_and_stderr.log
Created September 23, 2015 05:19
Passenger Run with EXTRA_CXXFLAGS=-DBOOST_MATH_DISABLE_STD_FPCLASSIFY environment variable.
Welcome to the Phusion Passenger Apache 2 module installer, v5.0.18.
This installer will guide you through the entire installation process. It
shouldn't take more than 3 minutes in total.
Here's what you can expect from the installation process:
1. The Apache 2 module will be installed for you.
2. You'll learn how to configure Apache.
3. You'll learn how to deploy a Ruby on Rails application.