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
#!/usr/bin/python | |
import sys | |
class Node(object): | |
def __init__(self): | |
pass | |
class TextNode(Node): | |
def __init__(self, text = ''): | |
Node.__init__(self) |
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 { Component, Input, AfterViewInit } from '@angular/core'; | |
import { NgModel, DefaultValueAccessor, NgControl } from '@angular/forms'; | |
import { Http, Headers, RequestOptions } from '@angular/http'; | |
@Component({ | |
selector: 'app-file-uploader', | |
template: '<input type="file" (change)="updated($event);">', | |
providers: [NgModel, DefaultValueAccessor] | |
}) | |
export class FileUploaderComponent implements AfterViewInit { |
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
let out = ''; | |
for (let node of document.querySelectorAll('ul .zsg-photo-card-caption')) { | |
out += node.querySelector('.zsg-photo-card-address').innerHTML.replace(/,/g, '\t') +'\t'+ | |
node.querySelector('.zsg-photo-card-price').innerHTML + '\t' + | |
node.querySelector('.zsg-photo-card-info').innerHTML | |
.replace(/<[^>]+>/g,'') | |
.replace(/ · /g, '\t') | |
.replace(/[ a-z]+/g, '') + | |
'\n'; | |
} |
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
> node sample.js | |
TypeError: Cannot read property 'kind' of undefined | |
at nodeCanBeDecorated <path>/node_modules/typescript/lib/typescript.js:7805:35) | |
at nodeIsDecorated <path>/node_modules/typescript/lib/typescript.js:7825:16) | |
at nodeOrChildIsDecorated <path>/node_modules/typescript/lib/typescript.js:7829:16) | |
at Object.forEach <path>/node_modules/typescript/lib/typescript.js:1506:30) | |
at Object.childIsDecorated <path>/node_modules/typescript/lib/typescript.js:7835:27) | |
at getClassFacts <path>/node_modules/typescript/lib/typescript.js:51089:20) | |
at visitClassDeclaration <path>/node_modules/typescript/lib/typescript.js:51114:25) | |
at visitTypeScript <path>/node_modules/typescript/lib/typescript.js:50973:28) |
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
#!/bin/bash | |
COWNER=eaiti | |
SOWNER=git.eaiti.com | |
SHOST=https://$SOWNER/rest/api/1.0 | |
SERVER_CREDS=$1 | |
CHOST=https://api.bitbucket.org/2.0 | |
CLOUD_CREDS=$2 |