Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am cenkce on github.
  • I am cenkce (https://keybase.io/cenkce) on keybase.
  • I have a public key ASC-gr0h_WL5mVX2DVovhlHULn_2Ts-nUed-Ucdtm9S05wo

To claim this, I am signing this object:

@cenkce
cenkce / add-component.js
Last active February 21, 2019 12:29
Instantly add component to context
class StylingComponent {
}
StylingComponent.$$styleContext = {
classNames: "",
userProps: {
width: null,
height: null,
paddingLeft: 10,
paddingRight: 10
@cenkce
cenkce / class_as_parameter_type.ts
Last active January 7, 2019 08:57
Class as a type. Also use data classes as own parameter type.
const getId = (start): (() => number) => (): number => start++;
export class SomeData {
static getId = getId(0);
public icon: string;
public text: string = "";
public color: string;
public idPrefix: string = 'data-';
public id: string;
@cenkce
cenkce / Readme.md
Last active July 10, 2018 09:21
Eclipse Che Requirements for MacOS
@cenkce
cenkce / deepMerge.js
Last active May 18, 2018 05:15
Deeply object merge
function isObj(val){
return val !== null && typeof val === "object";
}
function recurse(acc, obj){
for (var p in obj) {
acc[p] = isObj(obj[p]) ? recurse(acc[p] || {}, obj[p]) : obj[p];
}
return acc;