Skip to content

Instantly share code, notes, and snippets.

import Controller from '@ember/controller';
export default class ApplicationController extends Controller {
appName = 'Ember Twiddle';
}
import Ember from 'ember';
const { computed } = Ember;
const statKeys = ['a', 'b', 'c'];
// Some basic Ember class
const Thing = Ember.Object.extend({
stats: null
});
@fivetanley
fivetanley / javascript_ANSI_escape_codes.md
Created January 23, 2017 21:45 — forked from leommoore/javascript_ANSI_escape_codes.md
JavaScript - ANSI Escape Codes

#JavaScript - ANSI Escape Codes

ANSI Escape Codes are special characters which can be used to control formatting, colors or other output preferences in a text terminal. Escape Codes are non-printing code and will not appear in the output directly.

  • \033 begins the escape sequence
  • [ indicates the color
  • 33 is the foreground color for yellow
  • m indicates the end of the setting

Note: \033[39m is used set the color back to the terminal defult

import DS from "ember-data";
export default DS.JSONAPIAdapter.extend();
[Version]
Signature="$Windows NT$"
Provider="Microsoft Visual Studio 2008 Professional Edition - ENU"
[CompleteComponentList]
gencomp15
gencomp95
gencomp6
gencomp7
gencomp8
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
array: [1,2,3]
});
@fivetanley
fivetanley / application.adapter.js
Last active September 3, 2015 00:42 — forked from indirect/application.adapter.js
data-perf-demo
import DS from 'ember-data';
export default window.DS.ActiveModelAdapter.extend();

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

var Article = require('../../../models/article');

Those suck for maintenance and they're ugly.

Possible solutions

Bento, a project by the same company that makes Chef, is a Packer-based project for building base boxes. Unlike http://vagrantbox.es, Bento just uses base operating systems from the manufacturers with no pre-installed software. All the boxes are hosted on S3 in the following format:

https://opscode-vm-bento.s3.amazonaws.com/vagrant/PROVIDER/opscode_OS-VERSION_chef-provisionerless.box

For example, Ubuntu 13.04 lives here for VirtualBox:

https://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_ubuntu-13.04_chef-provisionerless.box

And the VMWare equivalent box lives:

(stolen from the feminism thread on SA)

Feminism 101, or "What in the fuck is The Gilded Cage?"

If you are new to feminism, approaching it from a position of privilege, or haven't read any of these books for any reason, I strongly recommend them.

Feminism is For Everybody: Passionate Politics by bell hooks. Coming from the perspective of a woman of color, bell hooks calls for feminism free of divisive policies and rich with discussion. She critically analyzes the problems facing feminists today, and proposes a vision of a beloved community that appeals to all those committed to equality in just 125 pages and using simple, accessible language.

No Turning Back: The History of Feminism and the Future of Women by Estelle Freedman. The author, a Stanford professor, examines 200 years of feminism and describes the critical momentum which the movement has gained. She explores the new approaches women are taking to traditional feminist concerns, and insightfully debunks the claim the feminism is dea