Skip to content

Instantly share code, notes, and snippets.


James Myers absolutelynotjames

  • Durham College
  • Greater Toronto Area
View GitHub Profile
pospi / leaflet-multi-geojson-layers.js
Last active Sep 23, 2016
Handle multiple geoJSON layers in a Leaflet.js angular directive
View leaflet-multi-geojson-layers.js
* Service to manage geoJSON layering with Leaflet.js' angular directive, which only allows 1 set of geoJSON data.
* Assuming you have a leaflet directive with its 'geojson' attribute set to `geojson`, usage is as follows:
* var layers = new GeoJSONLayers();
* layers.addLayer('myLayer', geoJSON, function(feature) { return { fillColor: '#00F' }; });
* $scope.geojson = layers.get();
* layers.removeLayer('myLayer');
View custom_wp_scripts_styles.php
The trick to this whole thing is the cache busting "filemtime()" function.
It takes the file creation time and makes that the version number.
So, we don't have to keep track of versions and it will always be unique.
// You don't have to define this stuff, but it can be useful for later since we reference them so much.
define( 'THEME_DIR_URI', get_template_directory_uri() );
define( 'THEME_DIR', get_template_directory() );
sogko / app.js
Last active Nov 27, 2021
gulp + expressjs + nodemon + browser-sync
View app.js
'use strict';
// simple express server
var express = require('express');
var app = express();
var router = express.Router();
app.get('/', function(req, res) {
noelboss /
Last active Dec 5, 2021
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like or and pull or export it to a production server. Or you use a service like to act upon a Web-Hook that's triggered that service.

soheilhy /
Last active Dec 8, 2021
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for,, and on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers