Skip to content

Instantly share code, notes, and snippets.

View debugging's full-sized avatar
🎯
Focusing

Salman Ahmed debugging

🎯
Focusing
View GitHub Profile
@eric
eric / bluebox.coffee
Last active December 25, 2015 17:19
Pipe all messages from BlueBox customer chat into Campfire
# Description:
# Providing ways to interact with bluebox
#
# Commands:
# hubot bluebox chat on - Enable chat transcripts
# hubot bluebox chat off - Disable chat trascripts
#
# Dependencies:
# "cookie": "0.1.0"
# "cheerio": "0.12.3"
@patriknw
patriknw / LoggingMailbox.scala
Last active January 5, 2023 08:12
Logs the mailbox size when exceeding the configured limit. Implemented in Scala and Java. Copy one of them to your project and define the configuration. This code is licensed under the Apache 2 license.
/**
* Copyright (C) 2009-2014 Typesafe Inc. <http://www.typesafe.com>
*/
package akka.contrib.mailbox
import scala.concurrent.duration._
import java.util.concurrent.atomic.AtomicInteger
import java.util.concurrent.atomic.AtomicLong
import com.typesafe.config.Config
import akka.actor.{ ActorContext, ActorRef, ActorSystem, ExtendedActorSystem }
@serbrech
serbrech / init.sh
Created April 25, 2012 18:37
This is how I bootstrap my envoironment. It's a small shellscript that will open a new tab and run the command past as argument to it.
#!/bin/sh
# Credits goes to http://stackoverflow.com/questions/1589114/opening-a-new-terminal-tab-in-osxsnow-leopard-with-the-opening-terminal-window#answer-7911097
# I just slightly modified it to take an argument.
new_tab() {
pwd=`pwd`
osascript -e "tell application \"Terminal\"" \
-e "tell application \"System Events\" to keystroke \"t\" using {command down}" \
-e "do script \"cd $pwd; clear; $1;\" in front window" \
@Gregg
Gregg / gist:968534
Created May 12, 2011 13:54
Code School Screencasting Framework

Screencasting Framework

The following document is a written account of the Code School screencasting framework. It should be used as a reference of the accompanying screencast on the topic.

Why you should care about screencasting?

You're probably aren't going to take the time to read this document if you're not interested, but there are a lot of nice side effects caused by learning how to create quality screencasts.

  1. Communicating more effectively - At Envy Labs we produce screencasts for our clients all the time. Whether it's demoing a new feature or for a presentation for an invester, they're often much more effective and pleasent than a phone call or screen sharing.
@retronym
retronym / generalised-type-constraints.scala
Created November 8, 2009 08:02
Demo of generalised type constraints in Scala 2.8
// scala 2.7 simple type constraint. This can only constrain a type parameter of this function.
// Below, in ListW.sumint28, we can't use this approach because we want to constrain T,
// a type param of the enclosing trait.
def sumint27A[T <: Int](l: List[T]) : Int = l.reduceLeft((a: Int, b: Int) => a + b)
trait IntLike[X] extends (X => Int)
object IntLike {
implicit val intIntLike: IntLike[Int] = new IntLike[Int] { def apply(x: Int) = identity(x) }
}