This file contains 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
// Learn more about configuring this file at <https://github.com/theintern/intern/wiki/Configuring-Intern>. | |
// These default settings work OK for most people. The options that *must* be changed below are the | |
// packages, suites, excludeInstrumentation, and (if you want functional tests) functionalSuites. | |
define({ | |
// The port on which the instrumenting proxy will listen | |
proxyPort: 9000, | |
// A fully qualified URL to the Intern proxy | |
proxyUrl: 'http://localhost:9000/', |
This file contains 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
#! /bin/bash | |
# This if for the mac hipchat client | |
# To setup, download this file to any folder and save as `hip.sh` | |
# change the permissions of the file so it is executable using terminal | |
# You can do this by running `chmod u+x ./hip.sh` | |
# Now you can run `./hip.sh` | |
echo 'Hipchat hooray...ho... - Press CTRL+C to stop' | |
while : | |
do |
This file contains 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
If port 22 is disabled on your network (you're getting timeouts on a public wifi network) you can force ssh connections to use https instead. | |
On your linux server, edit `/etc/ssh/sshd_config` and find `Port 22`. Comment it out and use port 443 instead. | |
# If you want to change the port on a SELinux system, you have to tell | |
# SELinux about this change. | |
# semanage port -a -t ssh_port_t -p tcp #PORTNUMBER | |
# Port 22 | |
Port 443 |
This file contains 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
#! /bin/bash | |
# ------ Description ------ | |
# Shell script to enable and disable iSight macs built in camera | |
# Open terminal, follow instructions below | |
# ------ Installation ------ | |
# cd ~/Downloads && curl -0 https://gist.githubusercontent.com/lfender6445/fa3f78f2f312fbba3bf1/raw/805e30f3e40d0f3211823ccde5e5bf085aad022a/gistfile1.sh -o mac_camera.sh && chmod +x mac_camera.sh | |
# ------ Usage ------------- | |
# ./mac_camera.sh | |
osascript <<EOF |
This file contains 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
# Benchmarks time difference between TEST_HASH.fetch(:baz, '') and TEST_HASH.fetch(:baz) { '' } | |
p 'Key does not exist -----' | |
TEST_HASH = { foo: :bar } | |
def operation | |
TEST_HASH.fetch(:baz, '') | |
end | |
def elaboration_time(&block) | |
s = Time.now |
This file contains 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 is a test |
This file contains 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
class A | |
SOMETHING = 'hello' | |
class B | |
class A | |
class D | |
constructor: -> | |
console.log(A::SOMETHING) | |
new D() |
This file contains 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 'pathname' | |
# Public: A Class containing all the metadata and utilities needed to manage a | |
# ruby project. | |
class ThisProject | |
# The name of this project | |
attr_accessor :name | |
# The author's name | |
attr_accessor :author |
This file contains 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
SHELL = /bin/sh | |
# V=0 quiet, V=1 verbose. other values don't work. | |
V = 0 | |
Q1 = $(V:1=) | |
Q = $(Q1:0=@) | |
ECHO1 = $(V:1=@:) | |
ECHO = $(ECHO1:0=@echo) |
This file contains 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 'socket' | |
# graphite/carbon settings | |
GRAPHITE_HOST="graphite.intra.local.ch" | |
GRAPHITE_PORT=8125 | |
def instrument_redis(redis_host) | |
namespace = "#{redis_host}" | |
redis = {} |