Skip to content

Instantly share code, notes, and snippets.

binary darwin-arm64 "https://nodejs.org/dist/v20.12.1/node-v20.12.1-darwin-arm64.tar.gz"
binary darwin-x64 "https://nodejs.org/dist/v20.12.1/node-v20.12.1-darwin-x64.tar.gz"
binary linux-arm64 "https://nodejs.org/dist/v20.12.1/node-v20.12.1-linux-arm64.tar.gz"
binary linux-x64 "https://nodejs.org/dist/v20.12.1/node-v20.12.1-linux-x64.tar.gz"
install_package "node-v20.12.1" "https://nodejs.org/dist/v20.12.1/node-v20.12.1.tar.gz"
[
{
"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 March 2, 2017 22:59
protractor-cucumber auto screenshot failures
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();
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));
#!/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 ..

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:

require 'csv'
require 'time'
drunk_tweets = []
CSV.new(File.new('tweets.csv'), headers: true, header_converters: :symbol).to_a.map(&:to_hash).each do |row|
tweet_hour = Time.parse(row[:timestamp]).hour
drunk_tweets << row if tweet_hour > 22 || tweet_hour < 5
end
#MaxHotkeysPerInterval 9000
WheelUp::
Send {WheelDown}
Return
WheelDown::
Send {WheelUp}
Return
@darrinholst
darrinholst / gist:5009667
Created February 22, 2013 00:11
unique twitter clients
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
# 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"