Skip to content

Instantly share code, notes, and snippets.

// 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/',
@lfender6445
lfender6445 / gist:70b00c97df43827279f7
Last active September 12, 2018 07:50
Never go idle in hipchat - Disable hipchat idle when away from computer
#! /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
@lfender6445
lfender6445 / gist:47a7d6e6f0e24a67ea0e
Created September 28, 2014 02:27
How to SSH when default port is blocked
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
@lfender6445
lfender6445 / gist:fa3f78f2f312fbba3bf1
Last active December 18, 2016 16:43
Disable Mac Built In Camera (i-Sight) - shell script
#! /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
@lfender6445
lfender6445 / ruby_hash_fetch_vs_fetch_block.rb
Last active December 12, 2023 08:47
Ruby - Hash#fetch vs #fetch with block performance
# 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 is a test
class A
SOMETHING = 'hello'
class B
class A
class D
constructor: ->
console.log(A::SOMETHING)
new D()
@lfender6445
lfender6445 / this.rb
Created February 5, 2015 18:39
util class for pulling basic project info
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
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)
@lfender6445
lfender6445 / redis-graphite
Last active May 4, 2016 17:15 — forked from somebox/redis-graphite.sh
graphite-redis : monitor redis statistics with graphite across several hosts
#!/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 = {}