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
It's a beautiful morning in Sunny California. It always is, except for the days which are terrible, during which everybody is so into the novelty of misery that they remark to one another about how happy they are for _something different_. | |
Dr. Striker steps out of her beat up silver Honda Odyssey and squints miserably into the rain. It plasters her hair to her face, bringing out her characteristic twisted expression of "nature makes me miserable". | |
"That was a great acid kinky sex party last night", thinks Dr. Striker. | |
Walking down the street, a car zooms by, kicking up a wave of clean water (the feces were washed away during the first few hours of rain last night). The water crests and splashes right onto a homeless person, sitting with all their stuff in plastic bags. The deluge hits them, and they look up at Dr. Striker as she passes. | |
The person's mouth is open, eyes creased shut. Wheezing. Are they crying? Laughing? Are those tears, or is it rain, both? Are they totally tripping out, or in rapture... d |
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 streamify = require('stream-generators') | |
let infiniteWordStream = (word) => { | |
return streamify(function*() { | |
for (let i = 0; i < 1000; i++) | |
yield word | |
}) | |
} | |
infiniteWordStream('1').pipe(process.stdout) |
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
async function main () { | |
for (let i = 0; i < 100; i++) { | |
console.log(i) | |
await new Promise(() => {}) | |
} | |
} | |
main() |
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
using System; | |
using ServiceStack; | |
using ServiceStack.Text; | |
using ServiceStack.Redis; | |
using ServiceStack.DataAnnotations; | |
var redisManager = new RedisManagerPool("localhost:6379"); | |
var redis = redisManager.GetClient(); | |
// let's make sure this key doesn't exist first |
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
console.log('alert') |
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
[HTTP] --> GET /wd/hub/session/bed650fd-90ec-401e-9a75-f4a0e766bdb6/location | |
[MJSONWP] Calling AppiumDriver.getGeoLocation() with args: ["bed650fd-90ec-401e-9a75-f4a0e766bdb6"] | |
[debug] [iOS] Executing iOS command 'getGeoLocation' | |
[HTTP] <-- GET /wd/hub/session/bed650fd-90ec-401e-9a75-f4a0e766bdb6/location 501 3 ms - 122 |
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
var wd = require('wd') | |
var remote = wd.remote('localhost', 4723) | |
var caps = { | |
"deviceName": "iPhone Simulator", | |
"browserName": "Safari", | |
"platformVersion": "8.2", | |
"platformName":"iOS", | |
"newCommandTimeout": 100000, |
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
'use strict' | |
let fs = require('fs'); | |
let B = require('bluebird'); | |
let readStream = fs.createReadStream(__filename) | |
readStream.on('close', function() { | |
console.log('regular close cb called') | |
}) |
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
// the xcode 6 simulators are really annoying, and bury the main app | |
// directories inside directories just named with Hashes. | |
// This function finds the proper directory by traversing all of them | |
// and reading a metadata plist (Mobile Container Manager)to get the | |
// bundle id. | |
async getAppDataDir (bundleId) { | |
if (await this.isFresh()) { | |
log.info('Attempted to get an app path from a fresh simulator ' + | |
'quickly launching the sim to populate its directories'); |
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
var targetWindow = UIATarget.localTarget().frontMostApp().mainWindow(); | |
var targetApp = UIATarget.localTarget(); | |
var interval = 1000; //ms interval to repeat | |
var wait = 5; //seconds to wait | |
var tapLocation = {x: 300, y: 300}; | |
var future = new Date(); | |
future.setSeconds(future.getSeconds()+wait); |
NewerOlder