Skip to content

Instantly share code, notes, and snippets.

@RyanHirsch
RyanHirsch / Usage.md
Last active December 27, 2015 19:29
md5 hashing in Powershell

Expected to live in a parent directory and then operate on files in child directories

PS C:\Releases> .\md5.ps1 .\App_v1\CompiledPackage.zip

@RyanHirsch
RyanHirsch / folder_structure.txt
Last active December 29, 2015 01:29
An attempt at a paging implementation for use with embersmith
contents
\posts
\2013
\first-post.md
\second-post.md
\2014
\third-post.md
\fourth-post.md
@RyanHirsch
RyanHirsch / dynamic_webpart.js
Created December 16, 2013 20:37
An first attempt to make a 100% client side web part know that it's being edited.
(function() {
var $wrappingDiv = $('div[webpartid]').last();
//console.log($wrappingDiv.attr('webpartid'));
$(document).ready(function() {
var inDesignMode = null;
if($('#MSOLayout_InDesignMode')) {
inDesignMode = $('#MSOLayout_InDesignMode').val();
}
@RyanHirsch
RyanHirsch / db.js
Created January 12, 2014 04:55
IRC to MongoDB logger
var mongoose = require('mongoose'),
util = require('util'),
config = require('./config.json');
var connection_string = util.format(
'mongodb://%s:%s@%s:%d/%s',
config.mongo.user,
config.mongo.password,
config.mongo.hostname,
config.mongo.port,
@RyanHirsch
RyanHirsch / config.json
Created March 20, 2014 11:01
Hapi Pack through code or through Composer
{
"servers": [
{
"port" : 8000,
"labels": ["public"]
}
],
"plugins": {
"capi-web": { }
}
@RyanHirsch
RyanHirsch / keybase.md
Last active March 6, 2017 18:30
keybase.md

Keybase proof

I hereby claim:

  • I am ryanhirsch on github.
  • I am ryanhirsch (https://keybase.io/ryanhirsch) on keybase.
  • I have a public key ASAZcYOvPHKaVfGMTo_7dL0AYZW4UBWcdhFu0H0CgOTxrgo

To claim this, I am signing this object:

@RyanHirsch
RyanHirsch / user-profile-test.js
Last active August 29, 2015 14:05
EmberData Model Test
import { test, moduleForModel } from 'ember-qunit';
moduleForModel('user-profile', 'UserProfile', {
// Specify the other units that are required for this test.
needs: []
});
test('display name works', function() {
var model = this.subject();
var store = this.store();
@RyanHirsch
RyanHirsch / hover-action.js
Last active December 8, 2015 13:30
Ember Hover binding
import Ember from 'ember';
export default Ember.Component.extend({
didInsertElement: function() {
var $this = this.$(),
$actions = Ember.$('.actions', $this);
$this.hover(function() {
$actions.slideDown();
}, function() {
$actions.slideUp();
// services/clock.js
import Ember from 'ember';
export default Ember.Object.extend({
pulse: Ember.computed.oneWay('_seconds').readOnly(),
minutePulse: Ember.computed.oneWay('_minutes').readOnly(),
tick: function () {
var clock = this;
Ember.run.later(function () {
var seconds = clock.get('_seconds');
@RyanHirsch
RyanHirsch / README.md
Created January 15, 2015 17:09
note/edit action

I have a lock action defined on my notes route. When I navigate directly to note/edit and the this.send('lock', model); throws an error because nothing handled it, but when I go to note and click the edit button the action goes to the notes route and it all works as I expect. Why is the action handled differently on a direct navigation to note/edit compared to note then clicking edit?