View myproject.conf
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
upstream myproject_upstream { | |
server 127.0.0.1:3000; | |
} | |
server { | |
listen 80; | |
root /Users/myusername/Projects/myproject/static; | |
server_name servername.com; |
View tasker_airtel.xml
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
<TaskerData sr="" dvi="1" tv="4.7u1m"> | |
<Task sr="task5"> | |
<cdate>1414934667539</cdate> | |
<edate>1434358392316</edate> | |
<id>5</id> | |
<nme>Check Airtel Broadband Usage</nme> | |
<pri>10</pri> | |
<Action sr="act0" ve="7"> | |
<code>118</code> | |
<Str sr="arg0" ve="3">http://122.160.230.125:8080</Str> |
View getNearest.js
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
const userId = '2ff8902e-97f0-431a-a51c-900a57532967'; | |
const location = r.point(-20, 39); | |
const queryOptions = {index: 'location'}; | |
// Getting nearest list of users, while also excluding `userId`. | |
UserModel.getNearest(location, queryOptions) | |
.filter(r.row('doc')('id').ne(userId)) | |
.run(); |
View mongo_add_admin.js
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
db.createUser( | |
{ | |
user: "admin_username", | |
pwd: "admin_password", | |
roles: | |
[ | |
{ | |
role: "userAdminAnyDatabase", | |
db: "admin" | |
} |
View PDFtoHTML.scala
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
package me | |
import java.io.{File, FileInputStream} | |
import org.apache.pdfbox.pdmodel.PDDocument | |
import org.apache.pdfbox.tools.PDFText2HTML | |
object PDFtoHTML { | |
def main(args: Array[String]): Unit = { | |
val stream = new FileInputStream(new File("/Users/me/Downloads/example.pdf")) |
View got.js
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
const {extend: gotExtend} = require('got'); | |
const http2 = require('http2-wrapper'); | |
const resolveALPN = require('resolve-alpn'); | |
// Taken from https://github.com/nodejs/node/blob/d4c91f28148af8a6c1a95392e5c88cb93d4b61c6/lib/_http_agent.js | |
// | |
// throws | |
// tls.connect({host: 'httpbin.org', port: 443}); | |
// | |
// doesn't throw |
View index.d.ts
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
// Type definitions for chrome-remote-interface 0.26.1 | |
// Project: https://github.com/cyrus-and/chrome-remote-interface | |
// Definitions by: GP <https://github.com/paambaati> | |
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | |
export = CDP; | |
declare function CDP(options?: CDP.ChromeRemoteInterfaceOptions): CDP.CDP; | |
declare namespace CDP { |
View map2json.js
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
// Optional: If any dependency is overriding Map's toJSON function, | |
// you might want to reset it. | |
// Why? See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#toJSON()_behavior | |
delete Map.prototype.toJSON; | |
function customStringifier(key, value) { | |
if (value instanceof Map) { | |
// Convert Maps to JSON objects. | |
let obj = Object.create(null); | |
for (let [k, v] of value) { |
View marathon_migrate.py
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/env python | |
# -*- coding: utf-8 -*- | |
import argparse | |
from os import environ | |
from json import load, loads, dumps | |
from urlparse import urlparse | |
try: | |
from urllib.request import urlopen, Request | |
from urllib.error import HTTPError |
View usa.geo.json
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer