Skip to content

Instantly share code, notes, and snippets.

View ahochsteger's full-sized avatar

Andreas Hochsteger ahochsteger

View GitHub Profile
@leodagdag
leodagdag / gist:3183045
Created July 26, 2012 16:22
linux init script for playframework 2
#!/bin/sh
### BEGIN INIT INFO
# Provides: playframework
# Required-Start: $local_fs $remote_fs $network $syslog
# Required-Stop: $local_fs $remote_fs $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start/Stop playframework
### END INIT INFO
#
@dkhenry
dkhenry / play2.service
Created January 6, 2013 21:28
Systemd script for the Play Framework
[Unit]
Description=Play2 Server for <site>
After=network.target
 
[Service]
Type=simple
PIDFile=<path>/RUNNING_PID
 
ExecStartPre=/bin/sh -c 'cd <path> ;/bin/rm RUNNING_PID ; sbt clean compile stage'
ExecStart=<path>/target/start
@peterfroehlich
peterfroehlich / commit_to_youtrack.py
Last active June 2, 2022 19:47
Mercurial hook to parse commit messages of just pushed commits for Youtrack IDs and post the commits and a link to the mercurial web interface as comments into the matching Youtrack ticket.
#!/usr/bin/env python
'''Get mercurial hook and post commit message with link to hg page to youtrack issue as comment.
Installation:
Add hook entry in your hgrc:
[hooks]
incoming = python:/<path>/commit-to-youtrack.py:hook
[youtrack-hook]
ID = EXPL,EG,OPS
AGGRO = False
@soofaloofa-zz
soofaloofa-zz / On choosing a hypermedia type
Last active October 14, 2023 07:23
On choosing a hypermedia type for your API - HAL, JSON-LD, Collection+JSON, SIREN, Oh My!
A comparison of Collection+JSON, HAL, JSON-LD and SIREN media types.
Discussion at
http://sookocheff.com/posts/2014-03-11-on-choosing-a-hypermedia-format/
@Chaser324
Chaser324 / GitHub-Forking.md
Last active July 22, 2024 14:45
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j

@SeanTRobinson
SeanTRobinson / ConfluenceBackup.sh
Last active June 6, 2022 14:58
Backup Atlassian Jira and Confluence from the command line.
#!/bin/bash
USERNAME=<username>
PASSWORD=<password>
INSTANCE="<company>.atlassian.net"
LOCATION="./Backups/"
mkdir "Backups"
# Grabs cookies and generates the backup on the UI.
'use strict';
var crypto = require('crypto');
var debug = require('debug')('withings');
var request = require('request');
var _ = require('lodash');
var EMAIL = process.env.EMAIL;
var PASSWORD = process.env.PASSWORD;
@praphull27
praphull27 / Jenkins_Protractor_Headless_Chrome_Setup_Ubuntu_14.04.md
Last active April 9, 2024 11:44
Jenkins, Protractor and Headless Chrome Browser Setup on Ubuntu 14.04

Jenkins, Protractor and Headless Chrome Browser Setup on Ubuntu 14.04

Update Ubuntu

sudo apt-get update
sudo apt-get upgrade

Install Java

@varemenos
varemenos / 1.README.md
Last active April 21, 2024 23:21
Git log in JSON format

Get Git log in JSON format

git log --pretty=format:'{%n  "commit": "%H",%n  "abbreviated_commit": "%h",%n  "tree": "%T",%n  "abbreviated_tree": "%t",%n  "parent": "%P",%n  "abbreviated_parent": "%p",%n  "refs": "%D",%n  "encoding": "%e",%n  "subject": "%s",%n  "sanitized_subject_line": "%f",%n  "body": "%b",%n  "commit_notes": "%N",%n  "verification_flag": "%G?",%n  "signer": "%GS",%n  "signer_key": "%GK",%n  "author": {%n    "name": "%aN",%n    "email": "%aE",%n    "date": "%aD"%n  },%n  "commiter": {%n    "name": "%cN",%n    "email": "%cE",%n    "date": "%cD"%n  }%n},'

The only information that aren't fetched are:

  • %B: raw body (unwrapped subject and body)
  • %GG: raw verification message from GPG for a signed commit
@disq
disq / Makefile
Last active January 10, 2022 20:00
Makefile for golang
#
# Generic Go project makefile
#
# Example:
# make PREFIX= DESTDIR=/tmp/project-name-build install
#
# PREFIX is mostly unused, it would be used to expose the installation path to installed files
# For now, running "make install" with PREFIX= is OK (as long as DESTDIR is set)
#
# For capistrano, it would be something like this: