INSERT GRAPHIC HERE (include hyperlink in image)
Subtitle or Short Description Goes Here
ideally one sentence >
// Unity C# Cheat Sheet | |
// I made these examples for students with prior exerience working with C# and Unity. | |
// Too much? Try Unity's very good tutorials to get up to speed: https://unity3d.com/learn/tutorials/topics/scripting |
if (!String.prototype.repeat) { | |
// polyfill from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/repeat | |
String.prototype.repeat = function(count) { | |
'use strict'; | |
if (this == null) { | |
throw new TypeError('can\'t convert ' + this + ' to object'); | |
} | |
var str = '' + this; | |
count = +count; | |
if (count != count) { |
$white: #ffffff; | |
$black: #000000; | |
$red50: #ffebee; | |
$red100: #ffcdd2; | |
$red200: #ef9a9a; | |
$red300: #e57373; | |
$red400: #ef5350; | |
$red500: #f44336; | |
$red600: #e53935; | |
$red700: #d32f2f; |
# See docs/examples | |
# http://doc.gitlab.com/ce/ci/quick_start/README.html | |
# http://doc.gitlab.com/ce/ci/yaml/README.html | |
# GitLab CI template for Go tests. Note this installs | |
# a new working copy of Go in a non-standard path such | |
# that sudo/root is not needed for the install stage. | |
# note that this particular install-environment stage | |
# is overly verbose in order to debug anything tricky |
##Angular Directive Priority - Quick Reference
When there are multiple directives defined on a single DOM element, sometimes it is necessary to specify the order in which the directives are applied. The priority is used to sort the directives before their compile
functions get called. Priority is defined as a number. Directives with greater numerical priority
are compiled first. Pre-link functions are also run in priority order, but post-link functions are run in reverse order. The order of directives with the same priority
is undefined. The default priority
is 0
.
For a brief description of each directive, click here.
Directive | Priority | Terminal | Creates new scope | Can be used as multiElement ---------- | :---------: | :---------: | :---------------
# DESCRIPTION | |
# Performs the commands needed to download and set up a new angular2 project using typescript and jspm | |
# | |
# Assumes you have these: | |
# - git | |
# - node / io.js | |
# - npm | |
# - npm install -g jspm@beta **NOTE**: you must have the beta release of jspm installed | |
# | |
# USAGE |
package transactions | |
import com.twitter.finagle.exp.mysql.{Client, OK, Result} | |
class Db(mysqlClient: Client) { | |
val insertOrder = "INSERT INTO orders (ref) VALUES(?)" | |
val insertOrderItem = "INSERT INTO order_items (order_id, item_id) VALUES(?, ?)" | |
def persistOrderWithItems[T](order: Order)(whenDone: (OK, Seq[Result]) => T): Future[T] = { |
#!/bin/bash | |
if [ "$(id -u)" != "0" ]; then | |
echo "This script must be run as root" 1>&2 | |
exit 1 | |
fi | |
cat <<MAXFILES > /Library/LaunchDaemons/limit.maxfiles.plist | |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> |
launchctl unload /Library/LaunchAgents/org.macosforge.xquartz.startx.plist | |
sudo launchctl unload /Library/LaunchDaemons/org.macosforge.xquartz.privileged_startx.plist | |
sudo rm -rf /opt/X11* /Library/Launch*/org.macosforge.xquartz.* /Applications/Utilities/XQuartz.app /etc/*paths.d/*XQuartz | |
sudo pkgutil --forget org.macosforge.xquartz.pkg | |
# Log out and log in |