Skip to content

Instantly share code, notes, and snippets.

View underhilllabs's full-sized avatar

Bart Lantz underhilllabs

View GitHub Profile
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 29, 2025 22:13
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@peterc
peterc / backwards.txt
Created November 26, 2012 23:08
Reading
I'm a Rubyist with a lot of admiration for Python. Both languages are
similar (in the grand scheme of things) and each has huge pros and cons.
Python does not click for me in the same way as Ruby does not
click for perhaps the majority of programmer-kind. German doesn't click
for me either and 100m+ people speak that ;-) But I recently saw an
example of WHY Python taxes my Ruby brain a little.
I found some code at http://lukeplant.me.uk/blog/posts/why-learning-haskell-python-makes-you-a-worse-programmer/:
@anchetaWern
anchetaWern / laravel-ums.markdown
Created December 6, 2012 11:14
Building a User Management System in Laravel

There's no shortage of good resources for learning laravel. So instead of the usual introductory tutorial were just gonna learn Laravel by building a project from scratch and that's gonna be a User Management System.

I don't know if my definition of a User Management System is correct but here's my idea of what's it's capable of doing:

  • Register Roles
  • Register Users
  • Update Users
@thomaspark
thomaspark / subnav.css
Last active April 27, 2025 16:39
Subnav for Bootstrap 2
section {
padding-top: 60px;
}
.subnav {
margin-bottom: 60px;
width: 100%;
height: 36px;
background-color: #eeeeee; /* Old browsers */
background-repeat: repeat-x; /* Repeat the gradient */
@matstani
matstani / handler.clj
Last active December 14, 2015 09:19
Compojureでファイルアップロード
(ns helloworld.handler
(:use compojure.core)
(:require [clojure.java.io :as io]
[ring.util.response :as response]
[compojure.handler :as handler]
[compojure.route :as route]
[hiccup.form :as form]
[hiccup.core :refer [html]]))
;; ページレイアウト
@ficusk
ficusk / GsonRequest.java
Last active January 6, 2025 22:43
A Volley adapter for JSON requests that will be parsed into Java objects by Gson.
import com.google.gson.Gson;
import com.google.gson.JsonSyntaxException;
import com.android.volley.AuthFailureError;
import com.android.volley.NetworkResponse;
import com.android.volley.ParseError;
import com.android.volley.Request;
import com.android.volley.Response;
import com.android.volley.Response.ErrorListener;
import com.android.volley.Response.Listener;
@mankyKitty
mankyKitty / ViewsHandlersShakedown.md
Last active October 27, 2021 05:32
This is a cheat sheet for information about extending the capabilities of Views by extending and building your own handlers. It will cover the basic handlers and attempt to cover some of the hooks that you might use when doing so. Including examples, basic documentation and some caveats where necessary.THIS IS NOT A COMPLETE LIST!! Consider the …

#Views Handlers - A Shakedown

This is a cheat sheet for information about extending the capabilities of Views by extending and building your own handlers. It will cover the basic handlers and attempt to cover some of the hooks that you might use when doing so. Including examples, basic documentation and some caveats where necessary. THIS IS NOT A COMPLETE LIST!! Consider the code of the handler your looking to extend to be the ultimate source of documentation. This is merely a convenience and a starting point.

_Ignore the tags in the included snippets, they are a convenience for formatting.

Extending / Including Your Handler

  • Determine which handler you're going to extend. (eg views_handler_field_numeric).
  • Create a PHP .inc file using the class name of your handler: views_handler_field_my_numeric_field.inc.
@underhilllabs
underhilllabs / fizzbuzz.el
Last active January 18, 2016 03:51
Fizzbuzz in emacs lisp. It works!
(defun fizzbuzz ()
"Fizzbuzz written in elisp. Count from 1 to 100, replacing numbers mod 3 with fizz, mod 5 with buzz,
and mod 3 and mod 5 with Fizzbuzz."
(interactive)
(insert "let's start this fizzbuzzin up!\n")
(mapcar (lambda (num)
(cond
;; if ((x % 3 == 0) && (x % 5 == 0))
((and (= (% num 3) 0) (= (% num 5) 0))
(insert "fizzbuzz\n"))
@toolmantim
toolmantim / Makefile
Last active August 21, 2024 20:56
An example of using Make instead of Grunt for fast, simple and maintainable front-end asset compilation.
# A simple Makefile alternative to using Grunt for your static asset compilation
#
## Usage
#
# $ npm install
#
# And then you can run various commands:
#
# $ make # compile files that need compiling
# $ make clean all # remove target files and recompile from scratch
@jgoux
jgoux / app.js
Created April 15, 2014 14:53
Ionic / AngularJS service wrapper for Web SQL API / SQLite-Cordova-Plugin
angular.module('myApp', ['ionic', 'myApp.services', 'myApp.controllers'])
.run(function(DB) {
DB.init();
});