Skip to content

Instantly share code, notes, and snippets.

Avatar
🐍
Programming

Travis Clarke clarketm

🐍
Programming
View GitHub Profile
View 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 Dec 3, 2017 — forked from postmodern/Makefile
A generic Makefile for building/signing/install bash scripts
View Makefile
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)
View raspberry-pi-vpn-router.md

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 Oct 26, 2017 — forked from vitorbritto/regex.md
Regex Cheat Sheet
View regex.md

Regular Expressions

Basic Syntax

  • /.../: Start and end regex delimiters
  • |: Alternation
  • (): Grouping
@clarketm
clarketm / String.js
Created Aug 18, 2017
String.prototype.toTitleCase
View String.js
String.prototype.toTitleCase = function () {
return this[0].toUpperCase() + this.substring(1).toLowerCase();
};
module.exports = String;
View sql-mongo_comparison.md

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 Jul 9, 2017 — forked from joyrexus/README.md
Vanilla JS equivalents of jQuery methods
View README.md

Sans jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
View 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 Jul 1, 2017 — 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.
View IntelliJ_IDEA__Perf_Tuning.txt
-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 Jun 23, 2017 — forked from CMCDragonkai/socat_server.sh
Socat: Simple HTTP Server
View socat_server.sh
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\";
"