This file contains hidden or 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 fetch from "fetch"; | |
class WebScraper { | |
public download(link) { | |
const page = fetch(link); | |
if (page.status === "OK") { | |
this.cache.add(link, page); | |
} else { | |
this.scheduler.schedule(link); | |
} |
This file contains hidden or 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
Both approaches from https://github.com/yarnpkg/yarn/issues/1326 |
This file contains hidden or 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
. |
This file contains hidden or 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
interface FirebaseQuery { | |
/** | |
* Listens for data changes at a particular location. | |
*/ | |
on(eventType: string, callback: (dataSnapshot: FirebaseDataSnapshot, prevChildName?: string) => void, cancelCallback?: (error: any) => void, context?: Object): (dataSnapshot: FirebaseDataSnapshot, prevChildName?: string) => void; | |
} | |
interface Firebase extends FirebaseQuery { | |
/** | |
* Generates a new child location using a unique name and returns a Firebase reference to it. |
This file contains hidden or 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
/// <reference path="../../tools/typings/firebase/firebase.d.ts"/> | |
module Chat { | |
class ChatMessage { | |
constructor(public name:string, public text:string) { | |
} | |
} | |
export class ChatEngine { | |
private static baseUrl = "<Your Firebase URL>"; | |
private firebase; |
This file contains hidden or 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
> tsd install firebase --save # Install the firebase definition | |
> tsd reinstall # Reinstall according to tsd.json |
This file contains hidden or 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
gulp.src(sourceTsFiles) | |
.pipe(sourcemaps.init()) | |
.pipe(tsc({ | |
target: 'ES5', | |
declarationFiles: false, | |
noExternalResolve: true, | |
typescript: require('typescript') // Only required if you override the default typescript dependency | |
})); |
This file contains hidden or 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
<link rel="import" href="../yt-video/yt-search-video.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
#yt_search_video { | |
width: 300px; | |
height: 300px; | |
left: 350px; |
This file contains hidden or 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
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc | |
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/ | |
// author: Pawel Kozlowski | |
var myApp = angular.module('myApp', []); | |
//service style, probably the simplest one | |
myApp.service('helloWorldFromService', function() { | |
this.sayHello = function() { | |
return "Hello, World!" |
This file contains hidden or 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
select default_tablespace, temporary_tablespace | |
from dba_users | |
where username = 'g' | |
select sum(bytes) from dba_segments where owner='g' | |
select * from dba_segments where owner='g' | |
select * from dba_segments where owner='g' | |
select * from dba_free_space where tablespace_name = 'USERS' order by bytes desc | |
ALTER TABLESPACE USERS ADD DATAFILE '/oracle/product/11.1.0/oradata/ORA11G/users02.dbf' SIZE 5242880 AUTOEXTEND ON NEXT 268435456 MAXSIZE 65535M |
NewerOlder