Skip to content
View ip-address-shell-alias.sh
# http://apple.stackexchange.com/questions/20547/how-do-i-find-my-ip-address-from-the-command-line
alias ip="dig +short myip.opendns.com @resolver1.opendns.com"
alias localip="ipconfig getifaddr en0"
View https-client.js
#!/usr/bin/env node --trace-sync-io
// curl command to test:
// curl --insecure -X GET -v https://localhost:3000/
// something similar in node using the https module
// works with:
// strictSSL: false, // allow us to use our self-signed cert for testing
// rejectUnauthorized: false
// no need to add
View ruby_ping.rb
# let us say you want to check if a host is reachable
# sometimes you need to be behind a private VPN or the host is just down
# and you want to do this on your local-machine and on Heroku
# can open your terminal and use ping on your local
# And can get a bash shell on Heroku as well - by `heroku run bash`
# but there is no `ping` binary there
# ```bash
View ls-on-file-watch.js
"use strict";
const fs = require('fs'),
spawn = require('child_process').spawn,
fileName = process.argv[2],
spawnCmd = process.argv[3],
spawnArgs = process.argv.slice(4, process.argv.length);
console.log([typeof spawnArgs, spawnArgs]);
if (!fileName) {
View file-watcher.js
const fs = require('fs'),
fileName = process.argv[2];
if (!fileName) {
throw Error("need to specify file to watch!");
}
fs.watch(fileName, function() {
console.log("file '"+ fileName + "' just changed");
});
View Generic Classes and Subtyping in Java.md
View how to find if a method is overridden.rb
# http://stackoverflow.com/questions/11462430/can-i-detect-that-a-method-has-been-overridden
module Ponger
def pong
"ping"
end
end
class HealthCheck
include Ponger
View calling different methods in sub-class.java
public class Foo {
public String ping() {
return "ping";
}
public String pong() {
return "pong";
}
}
View needed hubot commands.md

needed hubot commands

leaves calendar

  • add leave to calendar. leave needs to be added to multiple calendars, companies and projects
  • see leaves calendar

todo

View why Fixnum#respond_to?(:dup) is not false.md
Something went wrong with that request. Please try again.