Skip to content

Instantly share code, notes, and snippets.

View clarketm's full-sized avatar
🐍
Programming

Travis Clarke clarketm

🐍
Programming
View GitHub Profile
@clarketm
clarketm / Makefile
Created December 3, 2017 02:18 — forked from isaacs/Makefile
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@clarketm
clarketm / Makefile
Created December 3, 2017 02:18 — forked from postmodern/Makefile
A generic Makefile for building/signing/install bash scripts
NAME=project
VERSION=0.0.1
DIRS=etc lib bin sbin share
INSTALL_DIRS=`find $(DIRS) -type d 2>/dev/null`
INSTALL_FILES=`find $(DIRS) -type f 2>/dev/null`
DOC_FILES=*.md *.txt
PKG_DIR=pkg
PKG_NAME=$(NAME)-$(VERSION)
@clarketm
clarketm / raspberry-pi-vpn-router.md
Created November 19, 2017 20:41 — forked from superjamie/raspberry-pi-vpn-router.md
Raspberry Pi VPN Router

Raspberry Pi VPN Router

This is a quick-and-dirty guide to setting up a Raspberry Pi as a "router on a stick" to PrivateInternetAccess VPN.

Requirements

Install Raspbian Jessie (2016-05-27-raspbian-jessie.img) to your Pi's sdcard.

Use the Raspberry Pi Configuration tool or sudo raspi-config to:

@clarketm
clarketm / regex.md
Last active October 26, 2017 02:23 — forked from vitorbritto/regex.md
Regex Cheat Sheet

Regular Expressions

Basic Syntax

  • /.../: Start and end regex delimiters
  • |: Alternation
  • (): Grouping
@clarketm
clarketm / String.js
Created August 18, 2017 02:30
String.prototype.toTitleCase
String.prototype.toTitleCase = function () {
return this[0].toUpperCase() + this.substring(1).toLowerCase();
};
module.exports = String;
@clarketm
clarketm / sql-mongo_comparison.md
Created August 15, 2017 16:55 — forked from aponxi/sql-mongo_comparison.md
MongoDb Cheat Sheets

SQL to MongoDB Mapping Chart

SQL to MongoDB Mapping Chart

In addition to the charts that follow, you might want to consider the Frequently Asked Questions section for a selection of common questions about MongoDB.

Executables

The following table presents the MySQL/Oracle executables and the corresponding MongoDB executables.

@clarketm
clarketm / README.md
Created July 9, 2017 21:31 — forked from joyrexus/README.md
Vanilla JS equivalents of jQuery methods

Sans jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@clarketm
clarketm / keybase.md
Created July 2, 2017 06:40
keybase.md

Keybase proof

I hereby claim:

  • I am clarketm on github.
  • I am clarketm (https://keybase.io/clarketm) on keybase.
  • I have a public key ASDFEqdz1w3np0oGp6iGJNedsQAIGYvzod26hJ3675Tkgwo

To claim this, I am signing this object:

@clarketm
clarketm / IntelliJ_IDEA__Perf_Tuning.txt
Created July 1, 2017 20:13 — forked from P7h/IntelliJ_IDEA__Perf_Tuning.txt
Performance tuning parameters for IntelliJ IDEA. Add these params in idea64.exe.vmoptions or idea.exe.vmoptions file in IntelliJ IDEA. If you are using JDK 8.x, please knock off PermSize and MaxPermSize parameters from the tuning configuration.
-server
-Xms2048m
-Xmx2048m
-XX:NewSize=512m
-XX:MaxNewSize=512m
-XX:PermSize=512m
-XX:MaxPermSize=512m
-XX:+UseParNewGC
-XX:ParallelGCThreads=4
-XX:MaxTenuringThreshold=1
@clarketm
clarketm / socat_server.sh
Created June 23, 2017 21:05 — forked from CMCDragonkai/socat_server.sh
Socat: Simple HTTP Server
socat \
-v -d -d \
TCP-LISTEN:1234,crlf,reuseaddr,fork \
SYSTEM:"
echo HTTP/1.1 200 OK;
echo Content-Type\: text/plain;
echo;
echo \"Server: \$SOCAT_SOCKADDR:\$SOCAT_SOCKPORT\";
echo \"Client: \$SOCAT_PEERADDR:\$SOCAT_PEERPORT\";
"