Skip to content

Instantly share code, notes, and snippets.

View Lugoues's full-sized avatar

Peter Brunner Lugoues

  • ThorTech Solutions
  • New York
View GitHub Profile
@Lugoues
Lugoues / branch-fu.md
Created March 6, 2019 23:44 — forked from unbracketed/branch-fu.md
Moving commits between branches

Example: Moving up to a few commits to another branch

Branch A has commits (X,Y) that also need to be in Branch B. The cherry-pick operations should be done in the same chronological order that the commits appear in Branch A.

cherry-pick does support a range of commits, but if you have merge commits in that range, it gets really complicated

git checkout branch-B
git cherry-pick X
git cherry-pick Y
@Lugoues
Lugoues / kill_narrator.ps1
Created February 18, 2016 21:01
Disable Windows 10 Narrator
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\Narrator.exe" | New-ItemProperty -Name "Debugger" -Value "%1" -PropertyType String

Keybase proof

I hereby claim:

  • I am lugoues on github.
  • I am lugoues (https://keybase.io/lugoues) on keybase.
  • I have a public key whose fingerprint is DB3E 6CAE 0161 556B 2211 40AD 5851 7A59 C815 C65F

To claim this, I am signing this object:

@Lugoues
Lugoues / stern-brocot-sequence.clj
Last active July 13, 2018 08:45
Clojure: Stern-Brocot Sequence
;; See: http://en.wikipedia.org/wiki/Stern%E2%80%93Brocot_tree
(def stern-brocot-sequence
(map (fn [nums]
(/ (first nums) (second nums)))
(iterate
(fn [nums]
(let [a (first nums)
b (second nums)
r (rest (rest nums))]
(vec (flatten (conj [] b r (+ a b) b)))))
#!/bin/sh
# Use BeyondCompare as difftool for git in cygwin.
# git config --global difftool.bc3.cmd "beyondcompare-diff.sh \"\$LOCAL\" \"\$REMOTE\""
# git difftool -t bc3 branch1..branch2
# Reference: http://www.tldp.org/LDP/abs/abs-guide.pdf
library=githelperfunctions.sh
#[ -f $library ] && . $library