Skip to content

Instantly share code, notes, and snippets.

View joshbuchea's full-sized avatar

Josh Buchea joshbuchea

View GitHub Profile
@joshbuchea
joshbuchea / cordova-native-notifications.js
Created February 5, 2015 19:15
Cordova - window.alert → Native Notifications
document.addEventListener('deviceready', function () {
if (navigator.notification) { // Override default HTML alert with native dialog
window.alert = function (message) {
navigator.notification.alert(
message, // message
null, // callback
"Notification Title", // title
'OK' // buttonName
);
};
@joshbuchea
joshbuchea / osx-10.10-setup-COPY.md
Last active August 29, 2015 14:15 — forked from kevinelliott/osx-10.10-setup.md
Mac OS X 10.10 Yosemite Setup
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Single-Column Responsive Email Template</title>
<style>
@media only screen and (min-device-width: 541px) {
.content {
require 'fileutils'
# An OS X System Service for quickly filing image files to a Jekyll blog folder,
# putting Markdown links to the files on the clipboard.
# Copyright Brett Terpstra 2013
# Config
# ======
# Where to store the images
base_path = '~/Sites/dev/octopress/source/uploads/'
// REQUIRES:
// moment.js - https://github.com/moment/momentjs.com
// USAGE:
// {{ someDate | moment: [any moment function] : [param1] : [param2] : [param n]
// EXAMPLES:
// {{ someDate | moment: 'format': 'MMM DD, YYYY' }}
// {{ someDate | moment: 'fromNow' }}
if (typeof window.localStorage == 'undefined' || typeof window.sessionStorage == 'undefined') (function () {
var Storage = function (type) {
function createCookie(name, value, days) {
var date, expires;
if (days) {
date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
expires = "; expires="+date.toGMTString();

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post

Elevator Hack

This elevator "hack" will allow you to go immediately to your destination floor, bypassing all previously queued floors.

  1. Press & hold close door button until doors close. Keep holding.
  2. Press floor # button and do not release close door button until elevator moves.

Note: One LifeHacker commenter said: "it is completely dependant on the Logic Controller being used in the motor room of the elevator, as this trick does not work on older elevators".

To Do

@joshbuchea
joshbuchea / plist-to-json.sh
Created July 28, 2015 00:06
A shell script for Automator that can convert .plist to .json file.
for f in "$@"
do
filename="${f%.*}"
plutil -convert json "$filename".plist -o "$filename".json
done
@joshbuchea
joshbuchea / .gitignore
Last active August 29, 2015 14:26 — forked from octocat/.gitignore
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #