Skip to content

Instantly share code, notes, and snippets.

View GavinJoyce's full-sized avatar

Gavin Joyce GavinJoyce

View GitHub Profile
@GavinJoyce
GavinJoyce / webdis
Created May 28, 2012 14:30 — forked from xiangjian/redis-server
redis & webdis init script for ubuntu
#! /bin/sh
### BEGIN INIT INFO
# Provides: webdis-server
# Required-Start: $syslog
# Required-Stop: $syslog
# Should-Start: $local_fs
# Should-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: webdis-server - Persistent key-value db
#! /bin/sh
### BEGIN INIT INFO
# Provides: redis-server
# Required-Start: $syslog $remote_fs
# Required-Stop: $syslog $remote_fs
# Should-Start: $local_fs
# Should-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: redis-server - Persistent key-value db
@GavinJoyce
GavinJoyce / pr.md
Created October 5, 2013 08:29 — forked from piscisaureus/pr.md

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@GavinJoyce
GavinJoyce / application.controller.js
Created February 1, 2016 21:33 — forked from jakedetels/application.controller.js
Template registration issue
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle',
myComponentName: null,
actions: {
registerComponent() {
let template = Ember.Handlebars.compile('<b>First x-foo</b>');
@GavinJoyce
GavinJoyce / application.controller.js
Created February 1, 2016 22:08 — forked from brendan-rius/application.controller.js
intermediateTransitionTo()
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle'
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
style: Em.computed('color', function() {
return `background-color: red" onclick="alert(1)"`
})
});
@GavinJoyce
GavinJoyce / components.my-component.js
Last active November 27, 2016 00:45 — forked from simonihmig/components.my-component.js
hasBlock not available in partial for Ember 2.9.0-beta
import Ember from 'ember';
export default Ember.Component.extend({
});
import Ember from 'ember';
export default Ember.Component.extend({
});
import Ember from 'ember';
export default Ember.Component.extend({
actions: {
onChecked: function() {
this.checkboxCb();
}
}
});
import Ember from 'ember';
export default Ember.Component.extend({
actions: {
onChecked: function() {
this.checkboxCb();
}
}
});