Skip to content

Instantly share code, notes, and snippets.

Nick Clifford nickbclifford

Block or report user

Report or block nickbclifford

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
require "big"
require "http/client"
require "json"
def send_contract_call(to address, data)
JSON.parse("localhost:8545", body: {
"jsonrpc" => "2.0",
"method" => "eth_call",
"params" => [{
"to" => address,
nickbclifford /
Last active Aug 7, 2019
How to automatically deploy code to a server using Travis CI

Auto-Deploying via Travis CI

Because Travis CI can automatically execute scripts after successfully (or unsuccessfully!) executing tests, it is an obvious choice for a deployment tool. In order to deploy to a Git repository on a remote server, the process generally is as follows:

  • Set up SSH keys
  • Add the server's copy of the repository as a Git remote
  • Push to the remote
  • SSH into the server and execute any installation/compilation/miscellaneous commands

Before even touching .travis.yml...


nickbclifford / dominos.js
Last active Feb 18, 2017
Domino's Pizza JavaScript challenge
View dominos.js
function say(firstStr) {
// gotta love currying!
return function(secondStr) {
function hyphenSeparate(str) {
return str.replace(/[.,'"?!]/g, '') // remove punctuation
.split('') // split into array of chars
.reduce((a, v) => a + '-' + v); // concatenate with hyphens in between
return hyphenSeparate(firstStr) + ' ' + hyphenSeparate(secondStr);
You can’t perform that action at this time.