This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://people.ee.ethz.ch/~arkeller/linux/kernel_user_space_howto.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#rename local branch | |
git branch -m old-branch-name new-branch-name | |
#delete remote branch with old name | |
git push origin :old-branch-name | |
#create remote renamed branch | |
git push origin new-branch-name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sar -u 1 | grep --line-buffered all | awk -W interactive '{printf("%s %s\n", $1, $5);}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int __attribute__((section(".khook_origin,\"awx\",@progbits#"))) function(void) { ... } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Q: Git fails when pushing commit to github | |
A: git config --global http.postBuffer 524288000 | |
$ man git config | |
http.postBuffer | |
Maximum size in bytes of the buffer used by smart HTTP transports when POSTing data to the remote system. For | |
requests larger than this buffer size, HTTP/1.1 and Transfer-Encoding: chunked is used to avoid creating a | |
massive pack file locally. Default is 1 MiB, which is sufficient for most requests |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git format-patch --cover-letter --attach --stdout -2 --subject-prefix="..." --to=<...> | formail -ds >> $HOME/.thunderbird/k350j4w1.default/Mail/Local\ Folders/Drafts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# echo "chromium-browser hold" | sudo dpkg --set-selections | |
# dpkg --get-selections | grep chromium... | |
# echo "chromium-browser install" | sudo dpkg --set-selections |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Q: Where to get debug symbols for kernel X? | |
A: http://ddebs.ubuntu.com/pool/main/l/linux/ | |
codename=$(lsb_release -c | awk '{print $2}') | |
sudo tee /etc/apt/sources.list.d/ddebs.list << EOF | |
deb http://ddebs.ubuntu.com/ ${codename} main restricted universe multiverse | |
deb http://ddebs.ubuntu.com/ ${codename}-security main restricted universe multiverse | |
deb http://ddebs.ubuntu.com/ ${codename}-updates main restricted universe multiverse | |
deb http://ddebs.ubuntu.com/ ${codename}-proposed main restricted universe multiverse |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* memset_volatile is a volatile pointer to the memset function. | |
* You can call (*memset_volatile)(buf, val, len) or even | |
* memset_volatile(buf, val, len) just as you would call | |
* memset(buf, val, len), but the use of a volatile pointer | |
* guarantees that the compiler will not optimise the call away. | |
*/ | |
void * (* volatile memset_volatile)(void *, int, size_t) = memset; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use URI::Fetch; | |
use Cache::File; | |
use HTTP::Status qw(:constants); | |
$url = 'http://127.0.0.1:8080/media/snapshot.json.gz'; | |
$cache = Cache::File->new(cache_root => '/tmp/cache'); | |
$response = URI::Fetch->fetch($url, ForceResponse => 1, Cache => $cache); | |
if ($response->http_status == HTTP_OK) { |
OlderNewer