Skip to content

Instantly share code, notes, and snippets.

View cholick's full-sized avatar
:shipit:

Matt Cholick cholick

:shipit:
View GitHub Profile
@cholick
cholick / replicator.groovy
Last active December 10, 2015 00:19
Groovy program that rewrites itself exactly using a new, random filename.
def p = '''
@Grab(group='commons-lang', module='commons-lang', version='2.4') import static org.apache.commons.lang.RandomStringUtils.randomAlphanumeric
File file = new File("${randomAlphanumeric(8)}.groovy").write(p)
new GroovyShell(new Binding([p: "def p = ${"'"*3}${p}${"'"*3}; ${p.readLines()[3]}"])).evaluate(p.readLines()[0..2].join(';') as String)
'''; new GroovyShell(new Binding([p: "def p = ${"'"*3}${p}${"'"*3}; ${p.readLines()[3]}"])).evaluate(p.readLines()[0..2].join(';') as String)
@cholick
cholick / gist:5054035
Created February 28, 2013 03:52
Productivity fix
echo "\n184.72.112.163 reddit.com\n184.72.112.163 www.reddit.com" | sudo tee -a /etc/hosts
@cholick
cholick / project-config.xml
Created March 3, 2013 18:35
TeamCity configuration for an IntelliJ plugin building and testing against two versions of the SDK
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE project SYSTEM "../project-config.dtd">
<project id="project2">
<parameters />
<build-type id="bt4" name="IntelliJ 11.1 (IDEA IC 117-1054)">
<description />
<settings>
<parameters />
<build-runners>
@cholick
cholick / idea.vmoptions
Created January 24, 2016 20:47 — forked from ilguzin/idea.vmoptions
High performance Mac OS X IntelliJ IDEA options: /Applications/IntelliJ IDEA 12 CE.app/bin/idea.vmoptions
-server
-Xms512m
-Xmx2048m
-XX:MaxPermSize=512m
-XX:ReservedCodeCacheSize=256m
-XX:+UseCodeCacheFlushing
-XX:+UseCompressedOops
-XX:+UseConcMarkSweepGC
-XX:+AggressiveOpts
-XX:+CMSClassUnloadingEnabled
@cholick
cholick / fmtgo.sh
Last active February 27, 2017 17:37
Run go fomatter
#! /bin/bash -e
for d in $(ls -d */ | grep -vE "(vendor|Godeps)"); do
gofmt -w "$d"
done
FROM ubuntu:14.04
WORKDIR /tmp
#Update dist
RUN apt-get update
#Add Reqs for all CLI tool installs
RUN apt-get install -yq build-essential \
ruby ruby-dev \
@cholick
cholick / build.gradle
Last active October 24, 2018 21:08
Using Gradle & jarjar to repackage and embed incompatible transitive dependencies
apply plugin: 'groovy'
repositories {
mavenCentral()
}
configurations {
patch
[compile, testCompile]*.exclude module: 'jersey-server'
}
@cholick
cholick / twittermute.txt
Created January 3, 2020 23:50 — forked from IanColdwater/twittermute.txt
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@cholick
cholick / proxy.go
Created September 23, 2023 20:16
Tiny Go proxy for dev use
package main
import (
"flag"
"fmt"
"log"
"net/http"
"net/http/httputil"
"net/url"
"strings"