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
.directive('whenActive', | |
[ | |
'$location', | |
($location)-> | |
scope: true, | |
link: (scope, element, attr)-> | |
scope.$on '$routeChangeSuccess', | |
() -> | |
loc = "#"+$location.path() | |
href = element.attr('href') |
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
public class FirstChild extends Parent | |
{ | |
private String color; | |
public FirstChild(String color) | |
{ | |
this.color = color; | |
} |
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
# First | |
# cd "C:\Program Files\Sublime Text 2\" | |
# Second | |
# mklink subl.exe sublime_text.exe | |
# Third | |
# Add "C:\Program Files\Sublime Text 2\" to PATH | |
# Use it |
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
## Server configuration for nginx to host Atlassian Jira / Jetbrain TeamCity or any other Tomcat web application | |
# | |
# author cedric.walter, www.waltercedric.com | |
# to be saved for ex in /etc/nginx/sites-available/example | |
server { | |
listen 80; | |
server_name jira.example.com; | |
access_log off; | |
location / { |
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
<snippet> | |
<content><![CDATA[ | |
### | |
The MIT License (MIT) | |
Copyright (c) ${1:YEAR} ${1:NAME} | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights |
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
#pragma strict | |
import System.Text.RegularExpressions; | |
public class StringManipulation { | |
private static var interpolate : String = "\\{(.+?)\\}"; | |
/** | |
* Example use: StringManipulation.Format("{name} {weather}", { | |
"name": "Tom", |
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
#pragma strict | |
public class English { | |
public static var lang : Hashtable = { | |
// General | |
"game_name": "My Awesome Game" | |
// Menus | |
, "new_game" : "New Game" | |
, "save_game" : "Save Game" |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
if (window.location.protocol !== 'https:') { | |
window.location = 'https://' + window.location.hostname + window.location.pathname + window.location.hash; | |
} |
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
# Install Java. | |
sudo echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections | |
sudo add-apt-repository -y ppa:webupd8team/java | |
sudo apt-get update -y | |
sudo apt-get install -y oracle-java8-installer | |
sudo rm -rf /var/lib/apt/lists/* | |
sudo rm -rf /var/cache/oracle-jdk8-installer | |
# Define commonly used JAVA_HOME variable and update PATH | |
echo 'export JAVA_HOME=/usr/lib/jvm/java-8-oracle' >> ~/.bashrc |
OlderNewer