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
var AWS = require("aws-sdk"); | |
var async = require("async"); | |
var request = require("request"); | |
var s3 = new AWS.S3(); | |
// max number of concurrent requests | |
var CONCURRENT = 90; | |
var first = true; | |
// optional start key | |
var last = process.env.START; |
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
const Joi = require("joi"); | |
const PropTypes = require("./src/proptypes"); | |
const checkPropTypes = require("./src/proptypes/check-prop-types"); | |
const range = Array.from({length: 40}).map((_, index) => index); | |
const schemaObj = range.reduce((schema, i) => { | |
schema[i] = Joi.string().required(); | |
return schema; | |
}, {}); |
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
def capitalize(string) do | |
String.capitalize(String.at(string, 0)) <> String.slice(string, 1..String.length(string)-1) | |
end |
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 Html exposing (..) | |
import Html.Attributes exposing (..) | |
import Html.Events exposing (onClick, on, targetValue) | |
import String | |
import StartApp | |
import Effects | |
import Http | |
import Task | |
import Json.Decode exposing (succeed) |
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
use std::net::{TcpListener, TcpStream}; | |
use std::thread; | |
use std::io::Read; | |
use std::io::Write; | |
fn handle_client(mut stream: TcpStream) { | |
// read 20 bytes at a time from stream echoing back to stream | |
loop { | |
let mut read = [0; 1028]; | |
match stream.read(&mut read) { |
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 Relay from 'react-relay'; | |
export default class extends Relay.Route { | |
static path = '/'; | |
static queries = { | |
game: (Component) => Relay.QL` | |
query { | |
game { | |
${Component.getFragment('game')}, | |
}, |
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
var React = require('react'); | |
var { RouteHandler } = require('react-router'); | |
var UserSearchResults = require('../components/UserSearchResults'); | |
var actions = require('../actions/actions'); | |
var SearchStore = require('../stores/SearchStore'); | |
var Reflux = require('reflux'); | |
var Search = React.createClass({ | |
mixins: [Reflux.connect(SearchStore, 'search')], |
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
[ | |
{"keys": ["ctrl+/"], "command": "undo"}, | |
{"keys": ["ctrl+;"], "command": "toggle_comment", "args": {"block": false}}, | |
{"keys": ["ctrl+x", ";"], "command": "show_overlay", "args": {"overlay": "goto", "text": "#"}}, | |
{"keys": ["ctrl+p"], "command": "move", "args": {"by": "lines", "forward": false}}, | |
{"keys": ["ctrl+n"], "command": "move", "args": {"by": "lines", "forward": true}}, | |
{"keys": ["ctrl+f"], "command": "move", "args": {"by": "characters", "forward": true}}, | |
{"keys": ["ctrl+b"], "command": "move", "args": {"by": "characters", "forward": false}}, | |
{"keys": ["ctrl+a"], "command": "move_to", "args": {"extend": false, "to": "hardbol"}}, | |
{"keys": ["ctrl+e"], "command": "move_to", "args": {"extend": false, "to": "hardeol"}}, |
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
app.get('/', function (req, res) { | |
//tell varnish not to cache: | |
setHeaders(res, 32); | |
console.log(req.headers); | |
res.send('Hello World!<p /><p />Welcome to unrecoverable.pw, running on node.js.'); | |
db.getCollectionNames(function (err, results) { | |
res.send(JSON.stringify(results)); | |
}); | |
}); |
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
function without(o) { | |
var props = Array.prototype.slice.call(arguments, 1); | |
var r = {}; | |
for (var k in o) { | |
if (o.hasOwnProperty(k) && props.indexOf(k) === -1) | |
r[k] = o[k]; | |
} | |
return r; | |
} |
NewerOlder