Skip to content

Instantly share code, notes, and snippets.

@thomasbabuj
thomasbabuj / git.css
Last active August 29, 2015 14:22 — forked from neilgee/git.css
/* Set up Git Configuration */
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
git config --global core.editor "vi"
git config --global color.ui true
@thomasbabuj
thomasbabuj / .tmux.conf
Created December 16, 2015 02:40 — forked from peanav/.tmux.conf
My tmux.conf
# Make ESC work right
set -sg escape-time 0
# Make the colors work right
set -g default-terminal "screen-256color"
# set window and pane index to 1 (0 by default)
set-option -g base-index 1
setw -g pane-base-index 1
/*
Copyright 2011 Martin Hawksey
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@thomasbabuj
thomasbabuj / golang-tls.md
Created May 2, 2016 05:53 — forked from denji/golang-tls.md
Simple Golang HTTPS/TLS Examples

Generated private key

openssl genrsa -out server.key 2048

To generate a certificate

openssl req -new -x509 -key server.key -out server.pem -days 3650

https

// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible).
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export.
var FORMAT_ONELINE = 'One-line';
var FORMAT_MULTILINE = 'Multi-line';
var FORMAT_PRETTY = 'Pretty';
var LANGUAGE_JS = 'JavaScript';
var LANGUAGE_PYTHON = 'Python';
@thomasbabuj
thomasbabuj / fulcrum-email-notification.gs
Created May 29, 2016 15:16 — forked from bmcbride/fulcrum-email-notification.gs
Fulcrum Email Notification Webhook (Google Apps Script)
// Special Apps Script function to process HTTP POST request
function doPost(e){
return handleResponse(e);
}
function handleResponse(e) {
// Parse JSON webhook payload
var jsonString = e.postData.getDataAsString();
var payload = JSON.parse(jsonString);
@thomasbabuj
thomasbabuj / intro.markdown
Created August 17, 2016 04:18 — forked from tillsanders/intro.markdown
Laravel: drag-and-drop repositioning with auto-save of DB entries

Laravel: drag-and-drop repositioning with auto-save of DB entries

Use case: Database entries are represented in a table. By grabbing and moving a row up or down the table, you can change the entries' order/position. The changes are submitted automatically via ajax.

  • Uses jQueryUI (custom download: sortable is needed)
  • newly created elements are added to the top (see route /jobs/create)
@thomasbabuj
thomasbabuj / android_instructions.md
Created August 19, 2016 08:08 — forked from patrickhammond/android_instructions.md
Easily setup an Android development environment on a Mac

Here is a high level overview for what you need to do to get most of an Android environment setup and maintained.

Prerequisites (for Homebrew at a minimum, lots of other tools need these too):

  • XCode is installed (via the App Store)
  • XCode command line tools are installed (xcode-select --install will prompt up a dialog)
  • Java

Install Homebrew:

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

@thomasbabuj
thomasbabuj / AndroidManifest.xml
Created January 9, 2017 09:47 — forked from bjoernQ/AndroidManifest.xml
Creating a System Overlay (Always on Top over all Apps) in Android
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="de.mobilej.overlay"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="14" />
<application android:label="SystemOverlay" >
<activity