Skip to content

Instantly share code, notes, and snippets.

View gsiener's full-sized avatar
🚴‍♂️
NYC

Graham Siener gsiener

🚴‍♂️
NYC
View GitHub Profile
@imjasonh
imjasonh / README.md
Created June 24, 2020 12:54
Cloud Build custom task for Tekton

Google Cloud Build for Tekton

Install

Install and configure ko.

ko apply -f cmd/cloudbuild/
@willfarrell
willfarrell / ssh-keygen.sh
Last active June 17, 2018 22:14
Generate all SSH key pairs
#! /bin/bash
# Use Examples
# ./ssh-keygen Additional comments
# ./ssh-keygen "(Work)"
ROUNDS=100
if hash networksetup 2>/dev/null; then
# Mac only: Computer Name
COMMENT="$(networksetup -getcomputername) $@"
@Amit-PivotalLabs
Amit-PivotalLabs / README.md
Last active December 19, 2020 15:50
Spark on Cloud Foundry

Spark on Cloud Foundry

This document describes one means of running a simple Apache Spark cluster on Cloud Foundry. It makes heavy use of Cloud Foundry's container networking features.

You can see an example running at http://spark-ui-proxy.184.73.108.92.xip.io.

Deploy BOSH-Lite on AWS

This cluster was deployed using BOSH-Lite on AWS. Note, this Director cannot be targetted with the new BOSH CLI (see cloudfoundry-attic/bosh-lite#424), but you can use the "old" Ruby CLI just fine. You can use the new CLI for local workflows like manifest interpolation, and then the "old" CLI for remote workflows like deploying and SSH.

2015-01-29 Unofficial Relay FAQ

Compilation of questions and answers about Relay from React.js Conf.

Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.

What is Relay?

Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).

@coreyti
coreyti / gist:ce7bc4789bf8a988530f
Created November 6, 2014 16:47
ShuHaRi in Music

before we go any futher i'd like to show you all a game i made up. this game is called ["ShuHaRi in music"] and it can be played with any record, including this one. you may be surprised. now, if you have a pair of headphones, you better get 'em out and get 'em cranked up, 'cause they're really gonna help you. -- via Hot Chip

The Idea (adapted from Martin Fowler's)

@tgerring
tgerring / ipfs-guide-mac.md
Last active February 24, 2022 13:20
IPFS Mac Guide

IPFS Guide

Mac Installation

  1. Install Homebrew
  2. ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  3. Install prerequisites
  4. brew install git hg
  5. brew install osxfuse (see Mac issues to troubleshoot common errors)
  6. Install Go
@croaky
croaky / .travis.yml
Created July 31, 2013 18:25
This is our current Travis configuration for our standard Rails 4 + Ruby 2 projects that have Capybara Webkit test suites and Postgres databases. It relies on the bundle_cache.rb and bundle_install.sh files from http://randomerrata.com/post/45827813818/travis-s3 to cache gem bundles for much faster test suite setup time.
---
rvm:
- 2.0.0
before_install:
- "echo 'gem: --no-document' > ~/.gemrc"
- "echo '--colour' > ~/.rspec"
- gem install fog
- "./script/travis/bundle_install.sh"
- export DISPLAY=:99.0

This is a proof-of-concept of a couple of concurrent data structures written in Ruby.

The implementations are heavily commented for those interested. There are benchmarks (with results) included below. The results are interesting, but, as always, take with a grain of salt.

Data structures

AtomicLinkedQueue is a lock-free queue, built on atomic CAS operations.

@orta
orta / gist:4945269
Last active April 13, 2016 00:35
Get Google Analytics Stats from Hubot
# Artsy Editorial
#
# Get Page stats from google analytics
GA = require('googleanalytics')
util = require('util')
require('date-utils');
module.exports = (robot) ->
robot.hear /stats (.*)http:\/\/artsy.net\/(.*)/i, (msg) ->
# Depends on gems eventmachine, em-http-request,
# and em-resolv-replace (for # async DNS)
require 'eventmachine'
require 'em-http'
require 'fiber'
require 'em-resolv-replace'
def make_request_to(url)
connection = EventMachine::HttpRequest.new(url)