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.
$ python -m SimpleHTTPServer 8000
#!/bin/sh | |
# | |
# An example hook script to verify what is about to be committed. | |
# Called by "git commit" with no arguments. The hook should | |
# exit with non-zero status after issuing an appropriate message if | |
# it wants to stop the commit. | |
# | |
# Usage: | |
# Remove the .sh file extension when you put the script in your hooks folder! | |
# |
/*\ | |
* Controller-mixin pattern | |
\*/ | |
// At it's simplest: | |
myModule | |
.controller('aCtrl', function($scope, aCtrlMixin1, aCtrlMixin2, condition) { | |
if (condition) { | |
aCtrlMixin1($scope) | |
} else { |
<!-- PLACE IN .xbmc/userdata/keymaps/Keymap.xml --> | |
<!-- This file contains the mapping of keys (gamepad, remote, and keyboard) to actions within XBMC --> | |
<!-- The <global> section is a fall through - they will only be used if the button is not --> | |
<!-- used in the current window's section. Note that there is only handling --> | |
<!-- for a single action per button at this stage. --> | |
<!-- For joystick/gamepad configuration under linux/win32, see below as it differs from xbox --> | |
<!-- gamepads. --> | |
<!-- The format is: --> | |
<!-- <device> --> |
// api/controllers/AuthController.js | |
var passport = require('passport'); | |
var AuthController = { | |
login: function (req,res) | |
{ | |
res.view(); | |
}, |
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.
$ python -m SimpleHTTPServer 8000
docker run -rm -t -i -v $(dirname $SSH_AUTH_SOCK) -e SSH_AUTH_SOCK=$SSH_AUTH_SOCK ubuntu /bin/bash |
# Generates necessary certificates to ~/.docker | |
# | |
# Usage: | |
# bundle install | |
# ruby certgen.rb <domain> | |
require 'certificate_authority' | |
require 'fileutils' | |
if ARGV.empty? |
These are all the JSConf 2014 slides, codes, and notes I was able to cull together from twitter. Thanks to the speakers who posted them and thanks to @chantastic for posting his wonderful notes.
I'm looking to centralize logging for our dev team into Elasticsearch via Logstash. The wrinkle is that we aren't a Java shop, so installing java on our hosts just to ship logs back to a central Logstash indexer is something we'd like to avoid. So, I'm approaching things as a chance to understand RSyslog and its capabilities as a log shipper.
Uncomment the following lines in /etc/rsyslog.conf
. This will enable the rsyslog daemon to listen for incoming requests on TCP port 514. We're using TCP here so that we can have some confidence that the messages from the agent hosts reach the indexer. (More on this below)
angular.module('classyExtends', ['classy-core']).classy.plugin.controller | |
name: 'classyExtends' | |
classObjs: {} | |
waitingClassConstructors: {} | |
options: | |
enabled: true | |
convertInject: (classObj) -> |