Skip to content

Instantly share code, notes, and snippets.

/tmp$ git init test
Initialized empty Git repository in /private/tmp/test/.git/
/tmp$ cd test
/tmp/test (master #)$ touch a b
/tmp/test (master #)$ ls
a b
/tmp/test (master #)$ git status -z | hexdump -C
00000000 3f 3f 20 61 00 3f 3f 20 62 00 |?? a.?? b.|
0000000a
/tmp/test (master #)$ git --version
@lehnerpat
lehnerpat / holler.md
Last active August 29, 2015 14:14 — forked from cheezedigital/holler
git fetch --all
git checkout sprint015
git pull origin sprint015
git checkout -b my-new-feature
git add .
git commit -m "all my feature"
git checkout sprint015
git pull origin sprint015
git checkout my-new-feature

git rebase -i sprint015

import scalaz._
object Main {
implicit def setMonoid[A] = new Monoid[Set[A]] {
def append(f1: Set[A], f2: => Set[A]) = f1 union f2
def zero = Set[A]()
}
def main(args: Array[String]) {
@lehnerpat
lehnerpat / inw-output-test-linux.txt
Last active October 6, 2016 14:54
Test and comparison of inotifywait vs. inotify-win output and exclusion pattern application
############################################################
## TEST GROUP 1: simple events, watching absolute path
############################################################
{$ inotifywait -qmr /tmp/inwtest/}
[/tmp/inwtest]$ touch testfile
/tmp/inwtest/ CREATE testfile
/tmp/inwtest/ OPEN testfile
@lehnerpat
lehnerpat / dual-output-jack-ubuntu13.10.markdown
Last active June 1, 2020 06:23
Simultaneous output to Analog and HDMI with Jack on Ubuntu 13.10

How to get simultaneous / dual output to both Analog out and HDMI out with Jack Audio on Ubuntu 13.10

Configuration used:

  • OS: Xubuntu (Ubuntu) 13.10 (saucy)
  • Audio: HDA Intel PCH (ALC269VB Analog) on an Intel Core i5 2557M (Sandy Bridge microarch)

Install below packages and set user group, then reboot

Packages you will need (and the versions I had when I did this):

  • jackd2, 1.9.9.5+20130622git7de15e7a-1
@lehnerpat
lehnerpat / git-add--interactive--words.pl
Created February 2, 2014 08:13
Fixed git-add-interactive script to use color-words-diff with interactive checkout
#!/usr/bin/perl
use lib (split(/:/, $ENV{GITPERLLIB} || "/usr/share/perl/5.14.2"));
use 5.008;
use strict;
use warnings;
use Git;
binmode(STDOUT, ":raw");
/* Software License Agreement (BSD License)
*
* Copyright (c) 2011, Willow Garage, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
@lehnerpat
lehnerpat / payload.json
Created July 6, 2013 13:48
example webhook payload
{
"after":"98248f0e892ce4e4e37411730ac98b53f2aa1261",
"base_ref":"refs/heads/br2",
"before":"0000000000000000000000000000000000000000",
"commits":[
],
"compare":"https://github.com/nevik/testrepo/compare/tag2",
"created":true,
"deleted":false,
@lehnerpat
lehnerpat / readme.md
Last active December 18, 2015 00:09 — forked from anonymous/readme.md
  1. Paradoxes
  • Page 17
  • Page 24
@lehnerpat
lehnerpat / gh-compare.md
Last active September 3, 2022 04:33
GitHub Compare view

GitHub's compare view is available at:

https://github.com/$USER/$REPO/compare/$REV_A...$REV_B

Naturally, $USER and $REPO are the owner (user/organization) and repository names, respectively.

$REV{A,B} are the two sides of the compare view; they can either be a ref in $USER's repository, i.e. the name of a branch, tag or a commit SHA, or it can be a ref in $OWNER's fork of the repository by using the format $OWNER:$REF.

You can get a diff or patch for the result of the compare view by appending .diff or .patch to the URL, respectively.