Skip to content

Instantly share code, notes, and snippets.

#target photoshop
var doc = app.activeDocument;
function cTID(s) { return app.charIDToTypeID(s); };
function sTID(s) { return app.stringIDToTypeID(s); };
app.bringToFront();
main();
using System.Collections.Generic;
using UnityEngine;
public class LineGraph : MonoBehaviour {
class Point {
public int id;
public Vector3 pos;
}
readonly List<List<Point>> links = new List<List<Point>>();
{
"workbench.colorTheme": "Monokai",
"git.autofetch": true,
"window.zoomLevel": 1,
"editor.tokenColorCustomizations": {
"[Monokai]": {
"comments": "#74705E",
"strings": "#E6DB73",
"numbers": "#AE81FF",
"functions": "#FD971E",
using UnityEngine;
public class Test : MonoBehaviour {
public TpAtlas atlas;
public TpSprite sprite;
void OnEnable() {
var text = Resources.Load<TextAsset>("ui").text;
atlas = JsonUtility.FromJson<TpAtlas>(text);
var size = atlas.size;
@Kailang
Kailang / Monokaii.json
Created April 11, 2018 05:12
My single favorite color scheme for all time.
{
"name":"Monokaii",
"version":"1.0",
"description":"A smooth, dusky scheme.",
"originator":"Xamarin Inc. (http://xamarin.com)",
"colors":[
{"name": "Background(Read Only)", "color":"#252620" },
{"name": "Search result background", "color":"#005F60" },
{"name": "Search result background (highlighted)", "color":"#007F80" },
{"name": "Fold Square", "color":"#74705E", "secondcolor":"#272821" },
module Lib where
import Data.HashMap.Strict as H (HashMap, empty, fromList, insert, lookup, union)
--- Data Types
--- ----------
--- ### Environments and Results
type Env = H.HashMap String Val
@Kailang
Kailang / TestK.cs
Last active February 10, 2018 04:18
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.XR;
public class TestK : MonoBehaviour {
public Transform headTrans, lHandTrans, rHandTrans;
void OnDrawGizmosSelected() {
if (OVRManager.tracker == null) return;
var debug = require('debug')('gskse:corpController');
var Friend = getModel('friend');
var Corp = getModel('corp');
var News = getModel('news');
var Order = getModel('order');
var Stock = getModel('stock');
var Report = getModel('report');
var sharp = require('sharp');
var matchOrder = function(corp) {
var self = this;
self.corp = corp;
debug('corp [%s] [%s]', self.corp.symbol, self.corp.name);
return Promise.all([
Order.findOne({
corp: self.corp._id,
action: 'buy',
type: 'limit',
router.post('/trade', function(req, res, next) {
req.body.quantity = parseInt(req.body.quantity);
var self = this;
self.corp = res.locals.corp,
self.friend = res.locals.friend;
Order.create({
friend: self.friend._id,