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
Welcome to fish, the friendly interactive shell | |
Type help for instructions on how to use fish | |
~/D/P/c/puma (master) $ cd ~/Desktop/ | |
~/Desktop $ ls | |
temp.js | |
~/Desktop $ node temp.js | |
8 | |
~/Desktop $ gjslint temp.js | |
----- FILE : /home/kevin/Desktop/temp.js ----- | |
Line 1, E:0002: Missing space after "," |
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 your dock icon for Chrome is blurry in elementary OS Luna, this well help you fix it. | |
# This will create symbolic links for each of the icon sizes in the /usr/share/icons/elementary/apps directory. | |
# Log out and log back in afterwards to see the changes. | |
function make_link { | |
if [ "$1" ] | |
then | |
SIZE=$1; sudo ln -s /opt/google/chrome/product_logo_$SIZE.png /usr/share/icons/elementary/apps/$SIZE/google-chrome.png | |
fi | |
} |
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
// Three parts: | |
// 1. an enum with N values (or N+1 if you include a "None") | |
// 2. N enumerated singleton instances implementing a common interface. These provide information associated with each enum value in one place. | |
// 3. a static class allowing callers to access each enumerated singleton instance by passing in the corresponding enum value, creating it if necessary. | |
// Part 1 | |
public enum Biome | |
{ | |
Desert = 1, | |
Snow = 1 << 1, |
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
// a global function; no need to expose this in a header file | |
void internalDoSomething() | |
{ | |
// put your function here. | |
} | |
// note that if you were using C++ or Objective-C++ you'd need to put this in an extern closure, like so: | |
extern "C" | |
{ |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
public class CartesianProductSelectManyExample | |
{ | |
public static void Main(string[] args) | |
{ | |
var abcArray = new string[]{"a", "b", "c"}; |
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
void Update() | |
{ | |
// attach to camera | |
if (Input.GetMouseButtonDown(0)) { | |
var ray = camera.ScreenPointToRay(Input.mousePosition); | |
RaycastHit hit; | |
if (Physics.Raycast(ray, out hit)) { | |
Vector3 v = hit.point; | |
// instantiate the "ping" transform at v |