Skip to content

Instantly share code, notes, and snippets.

View dkuku's full-sized avatar

Daniel Kukula dkuku

View GitHub Profile
@dkuku
dkuku / stash-pop-recover
Created December 10, 2020 10:05 — forked from davidwalter0/stash-pop-recover
Undoing accidental git stash pop
# https://stackoverflow.com/questions/6543519/undoing-accidental-git-stash-pop
# https://stackoverflow.com/questions/89332/how-to-recover-a-dropped-stash-in-git
accepted
If you have only just popped it and the terminal is still open, you will still have the hash value printed by git stash pop on screen (thanks, Dolda).
Otherwise, you can find it using this for Linux and Unix:
git fsck --no-reflog | awk '/dangling commit/ {print $3}'
and for Windows:
@dkuku
dkuku / .gitconfig
Created May 2, 2018 14:35 — forked from tiagojdf/.gitconfig
My gitconfig
[user]
name = Firstname Lastname
email = username@myEmail.com
[alias]
co = checkout
cot = "!f() { git branch | grep $1 | xargs -I {} git co {}; }; f"
b = branch
pu = push -u origin HEAD
ci = commit
st = status
@dkuku
dkuku / 10-sync-acpi-intel.start
Last active December 11, 2015 18:38 — forked from michel-slm/sync-acpi-intel.sh
The brightness keys on my acer v5 doesn't work, and adding acpi_backlight=vendor to the kernel command line doesn't work too then this file is probably for you. Remove the "acpi_backlight=vendor" and run this file at start of your system. Using gentoo I put this file in /etc/local.d/, in ubuntu look for /etc/rc.local You need to install inotify
#!/bin/bash
# Copyright (c) 2011, Michel Alexandre Salim <salimma@fedoraproject.org>
# Permission is hereby granted, without written agreement and without
# license or royalty fees, to use, copy, modify, and distribute this
# software and its documentation for any purpose, provided that the
# above copyright notice and the following two paragraphs appear in
# all copies of this software.
#
# IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
# DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
@dkuku
dkuku / FR_EXP.c
Created July 14, 2011 09:38 — forked from RickKimball/FR_EXP.c
MSP-EXP430FR5739 - Demo program modified for msp430-gcc uniarch
/*******************************************************************************
*
* FR_EXP.c
* User Experience Code for the MSP-EXP430FR5739
* C Functions File
*
* Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/
*
*
* Redistribution and use in source and binary forms, with or without