Skip to content

Instantly share code, notes, and snippets.

View RyannosaurusRex's full-sized avatar

Ryan Hayes RyannosaurusRex

View GitHub Profile
using namespace System.Management.Automation
using namespace System.Management.Automation.Language
if ($host.Name -eq 'ConsoleHost')
{
Import-Module PSReadLine
}
#Import-Module PSColors
#Import-Module posh-git
Import-Module -Name Terminal-Icons
@DamianMac
DamianMac / build.sh
Created March 1, 2018 05:04
Cake .NET Core 2.0 bootstrapper
#!/usr/bin/env bash
##########################################################################
# This is a Cake bootstrapper script for Linux and OS X and netcore 2.0.
# Taken and tweaked a little from
# https://adamhathcock.blog/2017/07/12/net-core-on-circle-ci-2-0-using-docker-and-cake/
##########################################################################
# Define directories.
SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
CAKE_VERSION=0.26.0
@samselikoff
samselikoff / future-proof.md
Last active April 21, 2023 17:14
Future-proofing your Ember 1.x code

This post is also on my blog, since Gist doesn't support @ notifications.


Components are taking center stage in Ember 2.0. Here are some things you can do today to make the transition as smooth as possible:

  • Use Ember CLI
  • In general, replace views + controllers with components
  • Only use controllers at the top-level for receiving data from the route, and use Ember.Controller instead of Ember.ArrayController or Ember.ObjectController
  • Fetch data in your route, and set it as normal properties on your top-level controller. Export an Ember.Controller, otherwise a proxy will be generated. You can use Ember.RSVP.hash to simulate setting normal props on your controller.
@htuomola
htuomola / Hubs.tt
Last active May 8, 2016 20:41 — forked from robfe/Hubs.tt
A T4 template for generating TypeScript definition files for SignalR hubs. This fork includes minor corrections for using this in VS 2013, MVC 5 project: * Reference the SignalR 2.0 assembly * VS 2013 likes to put TS definition files into subfolders when downloaded from nuget - assuming that this file is directly under /typings/ * TypeScript 0.9…
<#@ template debug="true" hostspecific="true" language="C#" #>
<#@ output extension=".d.ts" #>
<# /* Update this line to match your version of SignalR */ #>
<#@ assembly name="$(SolutionDir)\packages\Microsoft.AspNet.SignalR.Core.2.0.0\lib\net45\Microsoft.AspNet.SignalR.Core.dll" #>
<# /* Load the current project's DLL to make sure the DefaultHubManager can find things */ #>
<#@ assembly name="$(TargetPath)" #>
<#@ assembly name="System.Core" #>
<#@ assembly name="System.Web" #>
<#@ assembly name="System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" #>
<#@ assembly name="System.Xml.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" #>
@benw
benw / load-hbs-partials.js
Created October 3, 2012 00:29
Loads partial handlebars templates from files in a directory
// Helps with this problem:
// http://stackoverflow.com/questions/8059914/express-js-hbs-module-register-partials-from-hbs-file
var hbs = require('hbs');
var fs = require('fs');
var partialsDir = __dirname + '/../views/partials';
var filenames = fs.readdirSync(partialsDir);
@crtr0
crtr0 / win8-js-restapi-boilerplate.js
Created June 15, 2012 19:37
Win8 JS library boilerplate for REST services
(function (globals) {
var
// The username and password for BASIC auth
username,
password,
// CHANGE THIS
apiRoot = "https://api.foo.com/version",
@connatser
connatser / _assets.yml
Created December 29, 2011 16:45
Rake web deploy
javascript_compressor: yui
gzip_assets: off
javascripts:
scripts:
- _source/libs/jquery-1.5.min.js
- _source/libs/jquery.address-1.4.min.js
- _source/src/myShit.js
- _source/src/moreOfMyShit.js
@mklabs
mklabs / bootstrap-plugins.txt
Created December 2, 2011 11:23
h5bp + twitter bootstrap integration
bootstrap-tooltip.js
bootstrap-popover.js
bootstrap-alert.js
bootstrap-button.js
bootstrap-carousel.js
bootstrap-collapse.js
bootstrap-dropdown.js
bootstrap-modal.js
bootstrap-scrollspy.js
bootstrap-tab.js