$ uname -r
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"; | |
/** | |
* @param {!Function.<!Promise>} action. | |
* @param {!Number | !string | !BigNumber} gasToUse. | |
* @returns {!Promise} which throws unless it hit a valid error. | |
*/ | |
module.exports = function expectedExceptionPromise(action, gasToUse) { | |
return new Promise(function (resolve, reject) { | |
try { |
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 Promise = require("bluebird"); | |
const sequentialPromise = require("./sequentialPromise.js"); | |
/** | |
* @param {!string | !Array.<!string>} txHash, a transaction hash or an array of transaction hashes. | |
* @param {Number} interval, in seconds. | |
* @returns {!Promise.<!object> | !Promise.<!Array.<!object>>} the receipt or an array of receipts. | |
*/ | |
module.exports = function getTransactionReceiptMined(txHash, interval) { | |
const self = this; |
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
// how_much_netflix.js | |
// A script that looks through your Netflix viewing activity and | |
// tallys up how much time you've spent watching Netflix | |
// | |
// INSTRUCTIONS TO USE: | |
// Open https://www.netflix.com/WiViewingActivity and the developer console | |
// Copy and paste this script into the developer console and press enter | |
// | |
(function() { | |
var fetchAllViewedItems = function() { |
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 AWS = require('aws-sdk'); | |
var http = require('http'); | |
var httpProxy = require('http-proxy'); | |
var express = require('express'); | |
var bodyParser = require('body-parser'); | |
var stream = require('stream'); | |
if (process.argv.length != 3) { | |
console.error('usage: aws-es-proxy <my-cluster-endpoint>'); | |
process.exit(1); |
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
<?xml version="1.0" encoding="utf-16"?> | |
<Patterns xmlns="urn:schemas-jetbrains-com:member-reordering-patterns"> | |
<TypePattern DisplayName="COM interfaces" Priority="2000"> | |
<TypePattern.Match> | |
<And> | |
<Kind Is="Interface" /> | |
<Or> | |
<HasAttribute Name="System.Runtime.InteropServices.InterfaceTypeAttribute" /> | |
<HasAttribute Name="System.Runtime.InteropServices.ComImport" /> | |
</Or> |
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
# | |
# Nginx proxy for Elasticsearch + Kibana | |
# | |
# In this setup, we are password protecting the saving of dashboards. You may | |
# wish to extend the password protection to all paths. | |
# | |
# Even though these paths are being called as the result of an ajax request, the | |
# browser will prompt for a username/password on the first request | |
# | |
# If you use this, you'll want to point config.js at http://FQDN:80/ instead of |
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 System.Linq.Expressions; | |
using Moq.Language.Flow; | |
namespace Moq | |
{ | |
public static class MoqExtensions | |
{ | |
public static ISetup<T, TResult> SetupIgnoreArgs<T, TResult>(this Mock<T> mock, | |
Expression<Func<T, TResult>> expression) |
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
public static class LogExtensions | |
{ | |
public static void InfoCall(this ILog log, Func<object> args = null, [CallerMemberName] string name = "") | |
{ | |
if (log.IsInfoEnabled) | |
log.Info(new Message(name, (args != null) ? args() : null)); | |
} | |
public static void DebugCall(this ILog log, Func<object> args = null, [CallerMemberName] string name = "") | |
{ |
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 boto | |
import boto.s3 | |
import os.path | |
import sys | |
# Fill these in - you get them when you sign up for S3 | |
AWS_ACCESS_KEY_ID = '' | |
AWS_ACCESS_KEY_SECRET = '' | |
# Fill in info on data to upload |
NewerOlder