Skip to content

Instantly share code, notes, and snippets.

View DavidSpriggs's full-sized avatar

David Spriggs DavidSpriggs

View GitHub Profile

Turning Off Github Issues

My friend Michael Jackson turned off github issues on one of his smaller projects. It got me thinking...

Maintainers getting burned out is a problem. Not just for the users of a project but the mental health of the maintainer. It's a big deal for both parties. Consumers want great tools, maintainers want to create them, but maintainers don't want to be L1 tech support, that's why they

<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="http://js.arcgis.com/3.11/esri/css/esri.css">
<script src="http://js.arcgis.com/3.11amd/"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.26/angular.min.js"></script>
<style>
html, body, #map {
@tchapin
tchapin / gist:9d5df61bde4ac5cc33fe
Last active August 29, 2015 14:06
Dojo Dialog positioning example
/**
* Created by tchapin on 9/23/2014.
*/
require([
"dojo/aspect",
"dojo/dom-style",
"dojo/on",
"dojo/_base/declare",
"dojo/_base/lang",
"dijit/form/Button",
@xeoncross
xeoncross / ajax.js
Last active August 3, 2023 06:06
Simple, cross-browser Javascript POST/GET xhr request object. Supports request data and proper AJAX headers.
/**
* IE 5.5+, Firefox, Opera, Chrome, Safari XHR object
*
* @param string url
* @param object callback
* @param mixed data
* @param null x
*/
function ajax(url, callback, data, x) {
try {
@onlinemad
onlinemad / init.js
Last active December 21, 2015 22:18
Init a new project based on bootstrap3-jade-node-express-grunt (https://github.com/ALT-F1/bootstrap3-jade-node-express-grunt)
#!/usr/bin/env node
var https = require('https'),
fs = require('fs'),
AdmZip = require('adm-zip'),
request = require('request'),
prompt = require('prompt'),
util = require('util'),
beautify = require('js-beautify').js_beautify;
@serdarb
serdarb / Download and Install MongoDB as Windows Service PowerShell Script
Last active July 26, 2023 12:22
A nice powershell that dowloads mongodb and installs it as windows service... this script is good for development machines.
Set-ExecutionPolicy RemoteSigned
$mongoDbPath = "C:\MongoDB"
$mongoDbConfigPath = "$mongoDbPath\mongod.cfg"
$url = "http://downloads.mongodb.org/win32/mongodb-win32-x86_64-2008plus-2.4.9.zip"
$zipFile = "$mongoDbPath\mongo.zip"
$unzippedFolderContent ="$mongoDbPath\mongodb-win32-x86_64-2008plus-2.4.9"
if ((Test-Path -path $mongoDbPath) -eq $True)
{

Node.js Resources

What is node.js?

Node.js is just JavaScript running on the server side. That's it. That's all there is to it.

Express

  • Express Docs, if you want to get started and already know JavaScript this is the place to be
@iambibhas
iambibhas / scopes.txt
Last active May 5, 2024 06:39
Sublime Text 2: Snippet scopes
Here is a list of scopes to use in Sublime Text 2 snippets -
ActionScript: source.actionscript.2
AppleScript: source.applescript
ASP: source.asp
Batch FIle: source.dosbatch
C#: source.cs
C++: source.c++
Clojure: source.clojure
CoffeeScript: source.coffee
@desandro
desandro / require-js-discussion.md
Created January 31, 2013 20:26
Can you help me understand the benefit of require.js?

I'm having trouble understanding the benefit of require.js. Can you help me out? I imagine other developers have a similar interest.

From Require.js - Why AMD:

The AMD format comes from wanting a module format that was better than today's "write a bunch of script tags with implicit dependencies that you have to manually order"

I don't quite understand why this methodology is so bad. The difficult part is that you have to manually order dependencies. But the benefit is that you don't have an additional layer of abstraction.


@odoe
odoe / EventedMap.js
Created September 17, 2012 22:05
Evented based esri.Map
// Because I was bored and wanted to use the foo.on() method with my map
define(['dojo/_base/declare', 'dojo/Evented'], function(declare, Evented) {
var EventedMap = declare([Evented, esri.Map], {
constructor: function() {
var _this = this;
dojo.connect(this, "onClick", function(event) {
return _this.emit("click", event);
});
dojo.connect(this, "onDblClick", function(event) {