This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module 'myapp', [] | |
.controller 'DemoController', class | |
constructor: (@$location) -> | |
@field = 'Field' | |
method: -> | |
'Method' | |
methodWithParam: (param) -> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Conditionally load WC polyfills --> | |
<script> | |
if ('registerElement' in document | |
&& 'createShadowRoot' in HTMLElement.prototype | |
&& 'import' in document.createElement('link') | |
&& 'content' in document.createElement('template')) { | |
// We're using a browser with native WC support! | |
} else { | |
document.write('<script src="/bower_components/webcomponentsjs/webcomponents.js"><\/script>'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<polymer-element name="require-js" attributes="libnames event"> | |
<script> | |
(function() { | |
// Helper function to add a script. | |
var addScript = function(src) { | |
var script = document.createElement('script'); | |
script.src = src; | |
var s = document.querySelector('script'); | |
s.parentNode.insertBefore(script, s); | |
return script; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
java -cp . logstash.runner agent -f logstash.conf -- web --backend elasticsearch:///?local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
typealias CancelableTask = (cancel: Bool) -> Void | |
func delay(time: NSTimeInterval, work: dispatch_block_t) -> CancelableTask? { | |
var finalTask: CancelableTask? | |
var cancelableTask: CancelableTask = { cancel in | |
if cancel { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
go build -gcflags '-N' |
These instructions were originally provided by Michelle Gill and lightly adapted for our use.
Running this on lab server with sysadmin account
cd /Volumes/Data/Korflab/Packages/
mkdir Miniconda
cd Miniconda
- Download the Python 2 version of Miniconda:
curl -O http://repo.continuum.io/miniconda/Miniconda-3.4.2-MacOSX-x86_64.sh
- Make executable:
chmod +x Miniconda-3.4.2-MacOSX-x86_64.sh
- Run script:
sudo ./chmod +x Miniconda-3.4.2-MacOSX-x86_64.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
/// Provides NSRegularExpression pattern matching | |
/// against strings in `switch` and `~=` statements | |
public struct Regex { | |
public let regexPattern: String | |
public let options: NSRegularExpression.Options | |
/// Initialize a `Regex` instance that | |
/// defaults to no options. Update as needed for |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<title>Polymer and RequireJS</title> | |
<script src="http://polymer.github.io/cdn/polymer.min.js"></script> | |
</head> | |
<body> | |
<!-- #foo --> | |
<div id="foo">the foo has no joy.</div> | |
OlderNewer