I hereby claim:
- I am dazza-codes on github.
- I am dweberconsulting (https://keybase.io/dweberconsulting) on keybase.
- I have a public key ASCpAAiwOwamDMGKlH2RIq30UzV1NpecET3EChmdtkeAZwo
To claim this, I am signing this object:
def valid_date_type(arg_date_str): | |
"""custom argparse *date* type for user dates values given from the command line""" | |
try: | |
return datetime.datetime.strptime(arg_date_str, "%Y-%m-%d") | |
except ValueError: | |
msg = "Given Date ({0}) not valid! Expected format, YYYY-MM-DD!".format(arg_date_str) | |
raise argparse.ArgumentTypeError(msg) | |
def valid_datetime_type(arg_datetime_str): | |
"""custom argparse type for user datetime values given from the command line""" |
var fullname = 'John Doe'; | |
var obj = { | |
fullname: 'Colin Ihrig', | |
prop: { | |
fullname: 'Aurelio De Rosa', | |
getFullname: function() { | |
return this.fullname; | |
} | |
} | |
}; |
I hereby claim:
To claim this, I am signing this object:
// To run this script: | |
// scala -cp ~/.m2/repository/org/marc4j/marc4j/2.7.3/marc4j-2.7.3.jar marcConsole.scala | |
val beforeUsedMem = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory(); | |
import java.io.ByteArrayOutputStream | |
import java.io.FileInputStream | |
import java.io.InputStream | |
import org.marc4j._ |
#!/bin/bash | |
# Useful GIT Functions | |
#### Cutting a release with a log of recent pull requests merged to master | |
git_release_commits () | |
{ | |
git pull | |
git fetch -p | |
git log --oneline --decorate | grep 'Merge pull request' | head -n25 |
require 'faraday' | |
require 'faraday_middleware' | |
class Client | |
JSON_CONTENT = 'application/json' | |
attr_reader :conn | |
# Initialize a new client | |
def initialize | |
@base_uri = 'https://api.example.org' |
#!/bin/bash | |
# check modified (M) ruby (.rb) files with rubocop | |
git status --porcelain | grep '^ M.*.rb' | cut -c4- | xargs -r rubocop |
#Model | |
@user.should have(1).error_on(:username) # Checks whether there is an error in username | |
@user.errors[:username].should include("can't be blank") # check for the error message | |
#Rendering | |
response.should render_template(:index) | |
#Redirecting | |
response.should redirect_to(movies_path) |
#!/bin/bash | |
manifest_url='http://releases.ubuntu.com/releases/trusty/ubuntu-14.04.3-desktop-amd64.manifest' | |
manifest_file=$(echo $manifest_url | sed -e 's#.*/##g') | |
if [ ! -e $manifest_file ]; then | |
wget -q $manifest_url | |
fi | |
cat $manifest_file | cut -f1 | sort -u > default_installed.txt | |
aptitude search '~i !~M' -F '%p' --disable-columns | sort -u > currently_installed.txt |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# This vagrant script relies on | |
# vagrant plugin install vagrant-triggers | |
VM_NAME = "vbox-dev" | |
VM_CPUS = 1 | |
VM_MEMORY = 2 * 1024 # in MB |