Skip to content

Instantly share code, notes, and snippets.

View wtf-google-plus.html
<html lang="en" dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 11 February 2007), see www.w3.org" />
<meta http-equiv="X-UA-Compatible" content="IE=9, IE=8, chrome=1" />
<base href="https://plus.google.com/" />
<script type="text/javascript">
//<![CDATA[
(function(){function a(c){this.t={};this.tick=function(c,e,b){b=b!=void 0?b:(new Date).getTime();this.t[c]=[b,e]};this.tick("start",null,c)}var d=new a;window.jstiming={Timer:a,load:d};try{var f=null;window.chrome&&window.chrome.csi&&(f=Math.floor(window.chrome.csi().pageT));f==null&&window.gtbExternal&&(f=window.gtbExternal.pageT());f==null&&window.external&&(f=window.external.pageT);f&&(window.jstiming.pt=f)}catch(g){};})();
View protractor-sharded.conf.js
const SHARD_COUNT = exports.SHARD_COUNT = +(process.env.PROTRACTOR_SHARD_COUNT || 4);
const _ = require('lodash');
const glob = require('glob');
const fs = require('fs');
exports.config = _.tap(_.clone(require('./protractor.conf.js').config), function (config) {
config.getMultiCapabilities = function () {
const shards = getShardedScenarios(getAllScenarios(config.capabilities.specs));
View oracle.json
[
{
"Id": "db9d6c0ad3bcc119f7ca1f1164149da7e2c4ff82f3298401cde308d05946d3a6",
"Created": "2018-09-14T20:18:39.885550309Z",
"Path": "/bin/sh",
"Args": [
"-c",
"/usr/sbin/startup.sh && tail -f /dev/null"
],
"State": {
@darrinholst
darrinholst / failure-hooks.js
Created Mar 2, 2017
protractor-cucumber auto screenshot failures
View failure-hooks.js
let {defineSupportCode} = require('cucumber');
defineSupportCode(({After}) => {
After(function(scenario, done) {
let world = this;
if (scenario.isFailed()) {
world.takeAndSaveScreenshot().then(function(filename) {
console.log(`Screenshot saved at ${filename}`); //eslint-disable-line no-console
done();
@darrinholst
darrinholst / amazon-linux.erb
Created Jan 6, 2012
chef bootstraper for amazon-linux
View amazon-linux.erb
bash -c '
#
# make sure sudo users have the full path...
#
# sudo visudo
# Defaults env_keep += "PATH"
# Defaults !secure_path
#
View gtm-test.sh
#!/usr/bin/env bash
echo -e "\n\n***\n*** Cleaning up\n***\n\n"
rm -rf ws1 ws2 remote
mkdir ws1 ws2 remote
echo -e "\n\n***\n*** initialize the remote repo\n***\n\n"
cd remote
git init --bare
cd ..
View keybase.md

Keybase proof

I hereby claim:

  • I am darrinholst on github.
  • I am darrinholst (https://keybase.io/darrinholst) on keybase.
  • I have a public key whose fingerprint is 713E D74E 3D82 55B8 1166 E5B8 8C50 64E5 B897 695D

To claim this, I am signing this object:

@darrinholst
darrinholst / gist:5009667
Created Feb 22, 2013
unique twitter clients
View gist:5009667
require 'csv'
sources = {}
CSV.foreach("/Users/darrinholst/Downloads/tweets/tweets.csv") do |row|
source = row[6]
next if source == "source"
link = source.match(/>(.*)<\/a>/)
source = link[1] if link
count = sources[source] || 0
View pushit.coffee
# Description:
# Salt-n-Pepa
#
# Commands:
# push it - Display some motivation from Salt-n-Pepa
saltnpepas = [
"http://cdn.madamenoire.com/wp-content/uploads/2011/02/salt_n_pepa_1.jpg"
"http://upload.wikimedia.org/wikipedia/en/3/30/Push_It_by_Salt-N-Pepa_single_cover.jpg"
"http://blogs.laweekly.com/westcoastsound/Salt-N-Pepa49919.jpg"
View logging.rb
class ActiveRecord::LogSubscriber
def sql_with_filtering(event)
return if 'CACHE' == event.payload[:name]
sql_without_filtering(event)
end
alias_method_chain :sql, :filtering
end