Skip to content

Instantly share code, notes, and snippets.

View spilth's full-sized avatar
👽
spilth.org

Brian Kelly spilth

👽
spilth.org
View GitHub Profile
@miwahall
miwahall / jquery-bootstrap-datepicker.css
Created October 17, 2013 17:10
jQuery UI Datepicker Bootstrap 3 Style
.ui-datepicker {
background-color: #fff;
border: 1px solid #66AFE9;
border-radius: 4px;
box-shadow: 0 0 8px rgba(102,175,233,.6);
display: none;
margin-top: 4px;
padding: 10px;
width: 240px;
}
@andrewh
andrewh / anyconnect.scpt
Last active April 12, 2024 08:48
Applescript to automate the Cisco AnyConnect SSL VPN client on OS X Mavericks
-- 1. Place in ~/Library/Scripts and enable the Applescript menu via the Applescript Editor
-- 2. Substitute "vpn.example.com" and "redacted" for your VPN server and password
-- 3. Open Security & Privacy System Preferences, go to Privacy, Accessibility
-- 4. Enable Applescript Editor and System UI Server
-- 5. Trigger script from the menu
-- 6. Enjoy being connected
tell application "Cisco AnyConnect Secure Mobility Client"
activate
end tell
@blacktm
blacktm / install_ruby_rpi.sh
Last active November 28, 2024 20:35
A Bash script to install Ruby on the Raspberry Pi
#!/bin/bash
# --------------------------------------------------------------------------------------------
# Installs Ruby using rbenv/ruby-build on the Raspberry Pi (Raspbian)
#
# Run from the web:
# bash <(curl -s https://gist.githubusercontent.com/blacktm/8302741/raw/install_ruby_rpi.sh)
# --------------------------------------------------------------------------------------------
# Set the Ruby version you want to install
@avh4
avh4 / gist:9560454
Created March 15, 2014 01:24
Stable testing with fluentlenium + angularjs
public class IntegrationTestBase extends FluentTest {
private static final String ngAppElement = "html";
private static final String markerClass = "angularReady";
public void waitForAngular() {
executeScript(
"angular.element(document.querySelector('body')).removeClass('" + markerClass + "');" +
"angular.element(document.querySelector('" + ngAppElement + "'))" +
" .injector().get('$browser').notifyWhenNoOutstandingRequests("+
" function() {" +
@addyosmani
addyosmani / README.md
Last active March 24, 2025 17:35 — forked from 140bytes/LICENSE.txt
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

@danawoodman
danawoodman / 0-react-hello-world.md
Last active March 9, 2024 00:32
React Hello World Examples

React "Hello World" Examples

Below are a small collection of React examples to get anyone started using React. They progress from simpler to more complex/full featured.

They will hopefully get you over the initial learning curve of the hard parts of React (JSX, props vs. state, lifecycle events, etc).

Usage

You will want to create an index.html file and copy/paste the contents of 1-base.html and then create a scripts.js file and copy/paste the contents of one of the examples into it.

@nertzy
nertzy / callgrind_profiler.rb
Last active August 29, 2015 14:20
CallgrindProfiler
require 'jruby/profiler'
require 'jruby/profiler/callgrind_printer'
module CallgrindProfiler
def callgrind
unless JRuby.runtime.instance_config.is_profiling?
STDERR.puts 'Profiling not enabled, re-run with `ruby --profile.api`'
return
end
@th3james
th3james / shatter-liz-phair.tab
Created July 12, 2015 15:10
Shatter by Liz Phair guitar tab
# Shatter - Liz Phair
Open D tuning with a capo on first fret.
Tab relative to capo
## Intro p1
d#|----------------------------------------|
A#|----------------------------------------|
@pdincau
pdincau / gist:08f7b2fac39088c87b75
Last active December 26, 2016 00:51
Things I learned about ExUnit
Run tests:
mix test
Run single test file:
mix test path/to/file
Run single test:
@rrag
rrag / README.md
Last active March 19, 2024 16:11
Yet another tutorial and Cheat sheet to Functional programming

There are many tutorials and articles available online which explain functional programming. Examples show small functions, which are composed into others which again get composed. It is hard to imagine how it would all work, then come the analogies and then the math. While the math is necessary to understand it can be difficult to grasp initially. The analogies on the other hand, (at least for me) are not relatable. Some articles assume the reader knows the different terminologies of FP. Over all I felt it is not inviting to learn.

This introduction is for those who have had a tough time understanding those analogies, taken the plunge to functional programming but still have not been able to swim. This is yet another tutorial on functional programming

Terminology

Functions as first class citizens

Functions are first class means they are just like anyone else, or rather they are not special, they behave the same as say primitives or strings or objects.