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 * as ts from "typescript"; | |
export class PatternLanguageServiceHost implements ts.LanguageServiceHost { | |
files: { | |
[fileName: string]: { | |
file: ts.IScriptSnapshot; | |
ver: number; | |
}; | |
} = {}; |
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
https://mermaidjs.github.io/mermaid-live-editor/#/edit/c2VxdWVuY2VEaWFncmFtCiAgICBCdXllci0-PlN5c3RlbTogbWFrZXMgcmVxdWVzdAogICAgTm90ZSByaWdodCBvZiBTeXN0ZW06IFdBSVRfUkVBRFkKICAgIFN5c3RlbS0tPj5TZWxsZXI6IHJlcXVlc3RzIHRvIG1vdmUgY29pbnMgZnJvbSBQT0NLRVQgdG8gRlJPWkVOCiAgICBTeXN0ZW0tPj5TZWxsZXI6IHNlbmRzIFNNUyB3aXRoIGRldGFpbHMKICAgIFNlbGxlci0-PlN5c3RlbTogYWNjZXB0cyByZXF1ZXN0CiAgICBOb3RlIHJpZ2h0IG9mIFN5c3RlbTogV0FJVF9QQVlNRU5UCiAgICBTeXN0ZW0tPj5CdXllcjogcHJvdmlkZXMgc2VsbGVyJ3MgcGF5bWVudCBkZXRhaWxzCiAgICBCdXllci0tPj5TZWxsZXI6IG1ha2VzIHBheW1lbnQKICAgIEJ1eWVyLT4-U3lzdGVtOiBjbGlja3MgIlBheW1lbnQgU2VudCIKICAgIE5vdGUgcmlnaHQgb2YgU3lzdGVtOiBXQUlUX0NPTkZJUk0KICAgIFN5c3RlbS0-PlNlbGxlcjogc2VuZHMgU01TCiAgICBTZWxsZXItLT4-U2VsbGVyOiBjaGVja3MgYmFsYW5jZQogICAgU2VsbGVyLT4-U3lzdGVtOiBjbGlja3MgUGF5bWVudCByZWNlaXZlZAogICAgTm90ZSByaWdodCBvZiBTeXN0ZW06IFNVQ0NFU1MKICAgIFN5c3RlbS0tPj5TZWxsZXI6IHJlcXVlc3RzIHNlbGxlcidzIGNvaW5zIGZyb20gRlJPWkVOCiAgICBTeXN0ZW0tLT4-QnV5ZXI6IG1vdmVzIGNvaW5zIHRvIGJ1eWVyJ3MgUE9DS0VUCiAgICBCdXllci0tPj5CdXllcjogc2VuZHMgd |
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
{ | |
"nodes": { | |
"slider1": { | |
"x": 200, | |
"y": 150, | |
"component": "NumberSlider", | |
"state": { | |
"value": 3, | |
"min": -20, | |
"max": 20, |
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
{ | |
"nodes": { | |
"slider1": { | |
"x": 200, | |
"y": 150, | |
"component": "NumberSlider", | |
"state": { | |
"value": 3, | |
"min": -20, | |
"max": 20, |
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 topolysis from "topolysis" | |
type Node { | |
id:string, | |
component:string, | |
inputs?:object | |
} | |
type Edge = [string,string] |
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
source 'https://rubygems.org' | |
gem 'stamp' |
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! require() some modules from npm (like you were using browserify) | |
// and then hit Run Code to run your code on the right side. | |
// Modules get downloaded from browserify-cdn and bundled in your browser. | |
const _ = require('lodash') | |
const THREE = require('three') | |
document.write(_.flatten([[0,1,2,3],[4,5]])) | |
alert('test') |
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
function greet(name) { | |
return "hello " + name; | |
} |
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
// visit reddit your user page and run this in console | |
function deletePosts() { $('form.toggle.del-button a.yes')[0].click(); window.scrollTo(0,document.body.scrollHeight); setTimeout(deletePosts, 1000 + (Math.random() * 2000)) } | |
deletePosts() |
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
class CreateLineItems < ActiveRecord::Migration[5.1] | |
def change | |
reversible do |dir| | |
dir.up do | |
execute <<-SQL | |
CREATE OR REPLACE FUNCTION calculate_total() | |
RETURNS trigger AS $$ | |
BEGIN | |
NEW.total_cost_cents = NEW.unit_cost_cents * NEW.quantity; |