Skip to content

Instantly share code, notes, and snippets.

:octocat:
:)

Hiroka Yago hhyyg

:octocat:
:)
Block or report user

Report or block hhyyg

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View circle-drum.md
.....................
............4C4......
..........1.404TFFFD.
..U..E...E..:02F.....
.......1D4...........
...N.51X...H.........
...........S.........
...........j.........
.....................
View note.orca
...................
.1D4.C.......C5....
....A62......1.....
..:18A.......J.....
.............1.....
..........C4.J.....
..........2Y21.....
............JJ.....
...........F21.....
............:11Aa..
View magical.js
const synth = new Tone.Synth().toMaster();
const polySynth = new Tone.PolySynth(6, Tone.Synth).toMaster();
polySynth.volume.value = -5;
Tone.Transport.bpm.value = 90;
const chordAb = ["Ab3", "Cb4", "Eb4", "Gb4"];
const chordDb = ["Ab3", "Cb4", "Db4", "F4"];
const chordEb = ["Gb3", "Bb3", "Db4"];
@hhyyg
hhyyg / spread-operator.ts
Last active Feb 15, 2019
TypeScript: Spread Operator(Object spread, Destructuring)
View spread-operator.ts
interface PersonA {
name: string,
group: string,
item1: string,
item2: string,
}
interface PersonB {
name: string,
@hhyyg
hhyyg / object.assign.ts
Last active Feb 13, 2019
Object.assign(), Spread_syntax, Index Signatures
View object.assign.ts
interface Foo {
readonly bar: number;
readonly baz: number;
}
const fooArray: Foo[] = [
{ bar: 100, baz: 200 },
{ bar: 300, baz: 400 },
]
View destructuring.ts
interface ViewModel {
name: string,
nums: number[],
displayName: string,
}
interface Model {
name: string,
nums: number[]
@hhyyg
hhyyg / readonly.ts
Created Feb 2, 2019
TypeScript readonly
View readonly.ts
// Properties
interface Foo {
readonly bar: number;
readonly bas: number;
}
const foo: Foo = { bar: 1, bas: 2 };
foo.bar = 11; // Error: [ts] Cannot assign to 'name' because it is a read-only property. [2540]
@hhyyg
hhyyg / readonly.ts
Created Feb 2, 2019
TypeScript readonly
View readonly.ts
// Properties
interface Foo {
readonly bar: number;
readonly bas: number;
}
const foo: Foo = { bar: 1, bas: 2 };
foo.bar = 11; // Error: [ts] Cannot assign to 'name' because it is a read-only property. [2540]
@hhyyg
hhyyg / main.ts
Created Nov 27, 2018
TypeScript Immutable and Copy
View main.ts
interface Person {
readonly groupName;
readonly name;
}
const taro: Person = {
groupName: "flower",
name: "taro",
}
You can’t perform that action at this time.