This file contains hidden or 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
require "benchmark" | |
def log msg | |
# NOOP | |
end | |
def with_if(x) | |
x.times do |n| | |
if (n % 3 == 0) && (n % 5 != 0) | |
log 'Fizz' |
This file contains hidden or 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 ruby | |
require 'json' | |
USAGE = "USAGE:\ngit ticket TICKET_ID\n" | |
# get ticket ID from first command line argument | |
ticket_id = ARGV[0] | |
unless ticket_id | |
print USAGE |
This file contains hidden or 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 ruby | |
# | |
# push_all Pushes commits and tags for the active branch to all remote repos. | |
# | |
BRANCH = `git rev-parse --abbrev-ref HEAD`.chomp | |
REMOTES = `git remote -v`.split("\n").map { |line| line.split.first}.sort.uniq | |
Result = Struct.new(:remote, :exit_code, :output) |
This file contains hidden or 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
/* | |
* this file includes both a node.js script for creating a keypair | |
* as well as the client code for using it | |
*/ | |
/* createKeypair.js */ | |
const fs = require('fs') | |
const anchor = require("@project-serum/anchor"); | |
const web3 = require('@solana/web3.js') | |
const account = anchor.web3.Keypair.generate(); |
OlderNewer