Skip to content

Instantly share code, notes, and snippets.

View dbt4u's full-sized avatar

Detlef Burkhardt dbt4u

View GitHub Profile
@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@jkeam
jkeam / GroovyExcelParser.groovy
Created November 16, 2012 02:57
A groovy script to parse an excel document.
import org.apache.poi.ss.usermodel.*
import org.apache.poi.hssf.usermodel.*
import org.apache.poi.xssf.usermodel.*
import org.apache.poi.ss.util.*
import org.apache.poi.ss.usermodel.*
import java.io.*
class GroovyExcelParser {
//http://poi.apache.org/spreadsheet/quick-guide.html#Iterator
@breunigs
breunigs / ingress_intel_chat_improvements.user.js
Last active June 30, 2017 21:27
Small improvements to the Ingress Chat at ingress.com/intel. 1. Better distinction between public/faction chat. Prevents accidentally posting to public. 2. Switch to faction chat by default. 3. Ability to hide automated messages (will consume a LOT of CPU though, so beware). 4. Scrolling up in chat issmoother (less “Loading…”) 5. Bits and pieces.
// ==UserScript==
// @name ingress.com/intel chat improvements
// @description Small improvements to the Ingress Chat at ingress.com/intel. 1. Better distinction between public/faction chat. Prevents accidentally posting to public. 2. Switch to faction chat by default. 3. Ability to hide automated messages (will consume a LOT of CPU though, so beware). 4. Scrolling up in chat issmoother (less “Loading…”) 5. Bits and pieces.
// @namespace https://gist.github.com/4415985
// @updateURL https://gist.github.com/raw/4415985/ingress_intel_chat_improvements.user.js
// @downloadURL https://gist.github.com/raw/4415985/ingress_intel_chat_improvements.user.js
// @include http://www.ingress.com/intel*
// @version 8
// ==/UserScript==
@rmorenobello
rmorenobello / JVMSystemProperties.java
Last active February 14, 2018 10:45
Set and Retrieve system (JVM) and environment (OS) variables in java and groovy
// Java System properties
// =======================
// http://docs.oracle.com/javase/tutorial/essential/environment/properties.html
// http://docs.oracle.com/javase/tutorial/essential/environment/sysprop.html
/*
Key Meaning
================
"file.separator" Character that separates components of a file path. This is "/" on UNIX and "\" on Windows.
"java.class.path" Path used to find directories and JAR archives containing class files. Elements of the class path are separated by a platform-specific character specified in the path.separator property.
"java.home" Installation directory for Java Runtime Environment (JRE)
@jaceklaskowski
jaceklaskowski / deployment-tool-ansible-puppet-chef-salt.md
Last active June 14, 2026 04:52
Choosing a deployment tool - ansible vs puppet vs chef vs salt

Requirements

  • no upfront installation/agents on remote/slave machines - ssh should be enough
  • application components should use third-party software, e.g. HDFS, Spark's cluster, deployed separately
  • configuration templating
  • environment requires/asserts, i.e. we need a JVM in a given version before doing deployment
  • deployment process run from Jenkins

Solution

@marcelbirkner
marcelbirkner / accessGitLabRestApi.groovy
Created September 24, 2015 20:17
Access GitLab REST API with Groovy
// GitLab Settings
def gitUrl = 'http://git/api/v3'
def privateToken = 'xYxYxYxYxYxYxYxYxYxY'
def currentPage = 1
def projectsPerPage = 100
// Reading projects from GitLab REST API
def projectList = new URL("${gitUrl}/projects/all?page=${currentPage}&per_page=${projectsPerPage}&private_token=${privateToken}")
def projects = new groovy.json.JsonSlurper().parse(projectList.newReader())
projects.each {
@jkubecki
jkubecki / ExportKindle.js
Last active July 18, 2026 04:22
Amazon Kindle Export
// The following data should be run in the console while viewing the page https://read.amazon.com/
// It will export a CSV file called "download" which can (and should) be renamed with a .csv extension
var db = openDatabase('K4W', '3', 'thedatabase', 1024 * 1024);
getAmazonCsv = function() {
// Set header for CSV export line - change this if you change the fields used
var csvData = "ASIN,Title,Authors,PurchaseDate\n";
db.transaction(function(tx) {
@treerao
treerao / ExportKindle.js
Last active May 18, 2020 22:13 — forked from jkubecki/ExportKindle.js
Amazon Kindle Export
// The following data should be run in the console while viewing the page https://read.amazon.com/
// It will export a CSV file called "download" which can (and should) be renamed with a .csv extension
var db = openDatabase('K4W', '2', 'thedatabase', 1024 * 1024);
getAmazonCsv = function() {
// Set header for CSV export line - change this if you change the fields used
var csvData = "ASIN,Type,Title,Authors,PurchaseDate\n";
db.transaction(function(tx) {
@vcastellm
vcastellm / docker-compose.yml
Last active December 6, 2017 17:12
docker compose for ecs-cli
version: '2'
services:
memcached:
image: memcached
app:
image: user/app
environment:
RAILS_ENV: development