Skip to content

Instantly share code, notes, and snippets.

View copperlight's full-sized avatar

Matthew Johnson copperlight

View GitHub Profile
@sethrylan
sethrylan / scalaConsole1
Last active June 17, 2016 20:08
ScalaBasePlugin scalaConsole/scalaTestConsole tasks
apply plugin: 'scala'
repositories {
mavenCentral()
}
ext {
versions = [
scala: '2.9.2',
scalatest: '2.0.M3',
@ddeyoung
ddeyoung / gist:5502723
Last active July 21, 2017 16:27
Enable comment toggling in Sublime Text 2 for Groovy on OS X
Copy the Java comment config file to the Groovy directory
cp ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/Java/Comments.tmPreferences ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/Groovy/
Edit ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/Groovy/Comments.tmPreferences
Change line 8
<string>source.java</string>
@Teqqles
Teqqles / UnTarFile.scala
Created January 20, 2016 13:26
Quick and dirty decompression of a tar gzip file using Apache Commons Compress and Scala
import java.io.{File, FileOutputStream, BufferedOutputStream, InputStream}
import org.apache.commons.compress.archivers.tar.{TarArchiveEntry, TarArchiveInputStream}
import org.apache.commons.compress.compressors.gzip.GzipCompressorInputStream
object UnTarFile {
val BUFFER = 2048
def untar( in: InputStream, destinationDir: String ) {
def processTar( tarIn: TarArchiveInputStream ): Unit = {
def processFileInTar( dest: BufferedOutputStream ): Unit = {
@NicolaeNMV
NicolaeNMV / akka-intellij-worksheet-work-arround.md
Last active February 17, 2021 15:35
How to run akka actors in Intelij Worksheet

Missing resource

Scala code run from Intellij Worksheet doesn't seem to be able to find the akka actor resources.

The error is:

com.typesafe.config.ConfigException$Missing: No configuration setting found for key 'akka'

There is an opened ticket on Intellij bugtracker https://youtrack.jetbrains.com/issue/SCL-9229 with a work arround

(ns async-test.timeout.core
(:require [cljs.core.async :refer [chan close!]])
(:require-macros
[cljs.core.async.macros :as m :refer [go]]))
(defn timeout [ms]
(let [c (chan)]
(js/setTimeout (fn [] (close! c)) ms)
c))
@jgeurts
jgeurts / install-graphite-ubuntu-12.04.sh
Created July 14, 2012 16:36 — forked from tkoeppen/install-graphite-ubuntu-10.04.sh
Install Graphite 0.9.10 on Ubuntu 12.04
####################################
# BASIC REQUIREMENTS
# http://graphite.wikidot.com/installation
# http://geek.michaelgrace.org/2011/09/how-to-install-graphite-on-ubuntu/
# Last tested & updated 10/13/2011
####################################
cd
sudo apt-get update
sudo apt-get upgrade
@BastienClement
BastienClement / gist:b34f14dd93381498a7a1
Created June 17, 2014 17:20
The CASC (Content Addressable Storage Container) Filesystem
---------------------------------------------------------------------
| The CASC (Content Addressable Storage Container) Filesystem |
| Warlords of Draenor Alpha, Build 6.0.1.18125 |
| Written April 14th, 2014 by Caali |
| Version 1.2 |
---------------------------------------------------------------------
Distribution and reproduction of this specification are allowed without
limitation, as long as it is not altered. Quotation in other works is
freely allowed, as long as the source and author of the quote are stated.
@stemid
stemid / brew.py
Created July 24, 2012 14:07
Homebrew module for ansible
#!/usr/bin/python -tt
# (c) 2012, Stefan Midjich
# Written by Stefan Midjich <swehack@gmail.com>
#
# This module was written for Ansible.
# It doesn't support all of Homebrew yet.
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
@rodw
rodw / backup-github.sh
Last active March 30, 2024 15:04
A simple script to backup an organization's GitHub repositories, wikis and issues.
#!/bin/bash
# A simple script to backup an organization's GitHub repositories.
#-------------------------------------------------------------------------------
# NOTES:
#-------------------------------------------------------------------------------
# * Under the heading "CONFIG" below you'll find a number of configuration
# parameters that must be personalized for your GitHub account and org.
# Replace the `<CHANGE-ME>` strings with the value described in the comments
# (or overwrite those values at run-time by providing environment variables).
@eyecatchup
eyecatchup / git-commit-log-stats.md
Last active April 12, 2024 14:50
Some commands to get git commit log statistics for a repository on the command line.

git commit stats

Commands to get commit statistics for a Git repository from the command line -
using git log, git shortlog and friends.