Skip to content

Instantly share code, notes, and snippets.

View kutyel's full-sized avatar
🌊
数学者に俺は成る!

Flavio Corpa kutyel

🌊
数学者に俺は成る!
View GitHub Profile
@kutyel
kutyel / employee.sh
Created April 22, 2016 12:08
From Oracle to Google
$ sqlplus -s
SQL> connect hr@oracle.com/hr
SQL> UPDATE employees SET current = false WHERE email = "Igor.Minar@oracle.com";
SQL> COMMIT;
SQL> disconnect
SQL> exit
$ curl -X POST -H "Content-Type: application/json" \
-d '{ "firstName":"Igor", "lastName":"Minar"}' \
http://google.com/employee/
@kutyel
kutyel / functional-programming-polyfill.js
Last active June 7, 2016 12:29 — forked from keropodium/array.js
Immutable-Functional-Array 🐑💨
Array.prototype.push = function(x) {
return [].concat(this, x);
};
Array.prototype.pop = function() {
return this.slice(0, this.length-1);
};
Array.prototype.unshift = function(x) {
return [].concat(x, this);
@kutyel
kutyel / settings.json
Created June 8, 2016 06:20
Ignore JavaScript generated files when working with TypeScript in VSCode
{
"files.exclude": {
"**/*.js": {
"when": "$(basename).ts"
},
"**/*.js.map": true
}
}
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"removeComments": false,
"noImplicitAny": false
@kutyel
kutyel / package.json
Last active June 21, 2016 06:10
Angular 2 Template
{
"name": "angular2-famous-painters",
"author": "noob",
"version": "1.0.0",
"scripts": {
"start": "tsc && concurrently \"npm run tsc:w\" \"npm run lite\" ",
"lite": "lite-server",
"postinstall": "typings install",
"tsc": "tsc",
"tsc:w": "tsc -w",
import { Injectable } from '@angular/core';
import { Painter } from './painter';
import { PAINTERS } from './painters.mock';
@Injectable()
export class PainterService {
getPainters(): Promise<Painter[]> {
return Promise.resolve(PAINTERS);
import { Component } from '@angular/core';
import { Painter } from './painter';
@Component({
inputs: ['painter'],
selector: 'my-painter-detail',
template: `
<div *ngIf="painter">
<h2>{{painter.name}}</h2>
import { Painter } from './painter';
export var PAINTERS: Painter[] = [
{
id: 1,
name: 'Michelangelo',
style: 'Renaissance',
examples: ['David', 'Sistine Chapel', 'The Last Judgement']
},
{
import { bootstrap } from '@angular/platform-browser-dynamic';
import { AppComponent } from './app.component';
bootstrap(AppComponent);
import { Component, OnInit } from '@angular/core';
import { Painter } from './painter';
import { PainterDetailComponent } from './painter-detail.component';
import { PainterService } from './painter.service';
@Component({
directives: [PainterDetailComponent],
providers: [PainterService],
selector: 'my-app',