Skip to content

Instantly share code, notes, and snippets.

View cancerberoSgx's full-sized avatar

Sebastián Gurin cancerberoSgx

  • home
  • Montevideo, Uruguay
View GitHub Profile
@cancerberoSgx
cancerberoSgx / backup-excluding.sh
Last active June 29, 2018 23:41
tgz excluding folders
tar --exclude='./.git' --exclude='./node_modules' -zcvf ../project-foo.tgz .
import Project from "ts-simple-ast";
const project = new Project({ useVirtualFileSystem: true });
const file = project.createSourceFile("src/a.ts", `
export class A {
method1(msg: string): string {
return "hello " + name;
}
}`);
file.getClassOrThrow("A").getMembers().forEach(m => console.log(m.getKindName()));
asciinema rec -t "typescript-ast-explorer cast 1" ../Documents/test4.cast
svg-term --in ../Documents/test4.cast --out demo3.sv
@cancerberoSgx
cancerberoSgx / css-like-pegjs-parser.txt
Created May 23, 2019 02:57
a css-like syntax parser using peg.js
/*
* CSS like attribute parsing.
*
* Parses strings like
`comp[name=myComp] > layer[name=myLayer light=true selected]` to objects.
`.cl #id>[name=123]`
*/
  • change "base" branch of this PR: master => 3.4 (use "Edit" button near PR title)
  • rebase your commits from master onto 3.4 branch. For example:
  • git rebase -i --onto upstream/3.4 upstream/master
  • push rebased commits into source branch of your fork (with --force option)