Skip to content

Instantly share code, notes, and snippets.

View jasimmonsv's full-sized avatar
🏴‍☠️

J.A. Simmons V jasimmonsv

🏴‍☠️
View GitHub Profile

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post

@jasimmonsv
jasimmonsv / keybase.md
Last active June 8, 2020 21:08
keybase.md

Keybase proof

I hereby claim:

  • I am jasimmonsv on github.
  • I am jasimmonsv (https://keybase.io/jasimmonsv) on keybase.
  • I have a public key ASCH8L-K2oL2TZt3VaoKdhRxOsd4YoM7f_ymnL_NW3kDnwo

To claim this, I am signing this object:

@jasimmonsv
jasimmonsv / ArrayStack.java
Last active August 29, 2015 14:12
ArrayStack.java
/** Implementation of the interface StackInt<E> using
* an array.
* @author Koffman & Wolfgang
*/
package com.jasimmonsv.Simmons_HW5;
import java.util.EmptyStackException;
public class arrayStack<E> implements StackInt<E> {
@jasimmonsv
jasimmonsv / StackInt.java
Last active August 29, 2015 14:12
StackInt.java
package com.jasimmonsv.Simmons_HW5;
public interface StackInt<E> {
E push(E obj);
E peek();
E pop();
boolean empty();
@jasimmonsv
jasimmonsv / TestArrayStack.java
Created January 2, 2015 06:20
TestArrayStack.java
package com.jasimmonsv.Simmons_HW5;
import java.util.EmptyStackException;
import com.jasimmonsv.Simmons_HW5.*;
//** Section 3.3 Exercise 2
public class TestArrayStack {
public static void main(String[] args){

Developer Cheat Sheets

This are my cheat sheets that I have compiled over the years. Tired of searching Google for the same things, I started adding the information here. As time went on, this list has grown. I use this almost everyday and this Gist is the first bookmark on my list for quick and easy access.

I recommend that you compile your own list of cheat sheets as typing out the commands has been super helpful in allowing me to retain the information longer.

@jasimmonsv
jasimmonsv / PerlIndex.pl
Created June 25, 2015 22:07
Perl Indexing
#!/usr/bin/perl
use strict;
use warnings;
my $string = 'perlmeme.org';
my $char = 'e';
my $offset = 0;
my $result = index($string, $char, $offset);
@jasimmonsv
jasimmonsv / daemon.py
Created March 10, 2017 17:35
a simple unix / linux daemon in python
#!/usr/bin/env python
# found on web archive: http://web.archive.org/web/20131017130434/http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/
import sys, os, time, atexit
from signal import SIGTERM
class Daemon:
"""
A generic daemon class.
refname="$1"
oldrev="$2"
newrev="$3"
# --- Safety check
if [ -z "$GIT_DIR" ]; then
echo "Don't run this script from the command line." >&2
echo " (if you want, you could supply GIT_DIR then run" >&2
echo " $0 <ref> <oldrev> <newrev>)" >&2
exit 1
@jasimmonsv
jasimmonsv / lambda_2_lambda.py
Created August 7, 2018 01:35
Invoke Lambda from within another Lambda
import json
import urllib
import boto3
lam = boto3.client('lambda')
def lambda_handler(event, context):
payload = {}
payload['key1'] = 'key1'
payload['key2'] = 'key2'