Skip to content

Instantly share code, notes, and snippets.

View jamesplease's full-sized avatar
🍕
yum

James Please jamesplease

🍕
yum
  • USA
View GitHub Profile
anonymous
anonymous / gistbook.json
Created November 25, 2014 02:43
Anonymous Gistbook
{"title":"Anonymous Gistbook","author":"Anonymous","pages":[{"pageName":"","sections":[{"type":"text","source":"Welcome to Gistbook! This is anonymous"}]}],"public":true}
@supereggbert
supereggbert / index.html
Last active October 15, 2023 23:19
3D Surface Plot in D3.js
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
body{
font-family: sans;
padding: 10px;
}
svg path{
@staltz
staltz / introrx.md
Last active May 3, 2024 13:00
The introduction to Reactive Programming you've been missing
define([], function() {
var breakOn = function(object, method) {
var originalMethod = object[method];
if (!originalMethod) {
throw new Error('Couldnt find method ' + method + ' to break on.');
}
return object[method] = function stopExecution() {
debugger;

A future version of Ember will come with a new templating engine known as HTMLBars.

The original motivation for HTMLBars was to allow helpers and properties to have better contextual information about what they were bound to.

So for example, consider a template like this:

<a href="{{url}}">{{link}}</a>
@thanpolas
thanpolas / Gruntfie.js
Last active December 26, 2015 16:48
Grunt Config for node server + livereload
module.exports = function (grunt) {
require('load-grunt-tasks')(grunt);
grunt.initConfig({
express: {
options: {
// Override defaults here
},
web: {
options: {
@brian-mann
brian-mann / gist:7085402
Last active September 3, 2017 20:14
The latest and greatest folder and file structure for Backbone / Marionette Apps
##Folder structure
/backbone
app.js
/apps
/entities
/lib
##Inside Apps
/apps
@willurd
willurd / web-servers.md
Last active May 4, 2024 07:22
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@gnarf
gnarf / ..git-pr.md
Last active April 12, 2024 22:00
git pr - Global .gitconfig aliases for Pull Request Managment

Install

Either copy the aliases from the .gitconfig or run the commands in add-pr-alias.sh

Usage

Easily checkout local copies of pull requests from remotes:

  • git pr 4 - creates local branch pr/4 from the github upstream(if it exists) or origin remote and checks it out
  • git pr 4 someremote - creates local branch pr/4 from someremote remote and checks it out
@murtaugh
murtaugh / cursor-reset.css
Last active May 11, 2023 17:28
CSS Cursor Reset
html,
body {
cursor: default;
}
code {
cursor: text;
}
/*