Skip to content

Instantly share code, notes, and snippets.

View schuyberg's full-sized avatar

Schuyler Lindberg schuyberg

  • The University of British Columbia
  • Vancouver, BC
View GitHub Profile
@ankurk91
ankurk91 / xdebug-mac.md
Last active March 9, 2024 22:20
php xDebug v3 on Ubuntu/Mac and phpStorm

🪲 Install and Configure xDebug v3 on MacOS for PhpStorm 🐘

  • Assuming that you have already installed php and apache via Homebrew

  • Install xDebug php extension

pecl channel-update pecl.php.net
pecl clear-cache

pecl install xdebug
@superjamie
superjamie / raspberry-pi-vpn-router.md
Last active December 29, 2024 07:04
Raspberry Pi VPN Router

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:

@learncodeacademy
learncodeacademy / pubsub.js
Created July 29, 2015 02:54
Basic Javascript PubSub Pattern
//events - a super-basic Javascript (publish subscribe) pattern
var events = {
events: {},
on: function (eventName, fn) {
this.events[eventName] = this.events[eventName] || [];
this.events[eventName].push(fn);
},
off: function(eventName, fn) {
if (this.events[eventName]) {
@xjamundx
xjamundx / blog-webpack-2.md
Last active November 7, 2024 13:10
From Require.js to Webpack - Part 2 (the how)

This is the follow up to a post I wrote recently called From Require.js to Webpack - Party 1 (the why) which was published in my personal blog.

In that post I talked about 3 main reasons for moving from require.js to webpack:

  1. Common JS support
  2. NPM support
  3. a healthy loader/plugin ecosystem.

Here I'll instead talk about some of the technical challenges that we faced during the migration. Despite the clear benefits in developer experience (DX) the setup was fairly difficult and I'd like to cover some of the challanges we faced to make the transition a bit easier.

@impressiver
impressiver / angular-jquery-adapter.js
Last active August 29, 2015 14:08
Angular/jQuery event wrappers
/******************************************************************************
*
* Adapter functions to deal w/ Angular <--> jQuery (custom) events
*
* I wrote these quickly just to see if they'd fly. They should really be added
* to a provider, I just haven't gotten around it.
*
*****************************************************************************/
/**
@elidupuis
elidupuis / README.md
Created November 27, 2013 22:49
Simple filtering example using Stapes.js and Rivets.js

Dependencies managed with Bower:

npm install -g bower
bower install

...Then open up index.html in a browser.

@torgeir
torgeir / audio-source-microphone.js
Created September 19, 2013 17:55
Microphone input as audio source js
window.AudioContext = window.AudioContext || window.webkitAudioContext;
navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia;
window.addEventListener('load', init, false);
function init () {
try {
record(new AudioContext());
}
catch (e) {
@mjsuhonos
mjsuhonos / LadderMODS.json
Last active December 17, 2015 23:08
JSON-LD syntax for mappings in Ladder
{
"@context": {
"ladder": "Ladder:",
"bibo": "http://purl.org/ontology/bibo/",
"dcterms": "http://purl.org/dc/terms/",
"foaf": "http://xmlns.com/foaf/0.1/",
"mads": "http://www.loc.gov/mads/rdf/v1#",
"mods": "http://www.loc.gov/mods/modsrdf/v1#",
"schema": "http://schema.org/",
"skos": "http://www.w3.org/2004/02/skos/core#"
@pwc3
pwc3 / Exchange Sync.applescript
Last active March 13, 2025 18:44
AppleScript to copy all of the events from an Exchange calendar to an iCloud calendar.
tell application "Calendar"
-- delete everything from the destination calendar
-- TODO: Change "Destination Calendar" to be the name of your destination calendar
repeat with anEvent in (get events of calendar "Destination Calendar")
delete anEvent
end repeat
-- copy all events from the source calendar to the destination
-- TODO: Change "Source Calendar" to be the name of your source calendar
-- TODO: Change "Destination Calendar" to be the name of your destination calendar
@egaumer
egaumer / app.js
Last active July 24, 2018 13:25
Getting Started with elasticsearch and AngularJS
/*jshint globalstrict:true */
/*global angular:true */
'use strict';
angular.module('demo', [
'demo.controllers',
'demo.directives',
'elasticjs.service'
]);