This file contains 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
std::ifstream file("test.txt", std::ios::in | std::ios::end); | |
std::size_t fileSize = file.tellg(); | |
std::vector<char> buffer(fileSize); | |
file.seekg(0, std::ios::beg); | |
file.read(buffer.data(), fileSize); | |
This file contains 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
#include <fstream> | |
#include <sstream> | |
#include <vector> | |
int main() | |
{ | |
std::ifstream file("Plop"); | |
if (file) | |
{ | |
/* |
This file contains 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
for n in {1..30}; do wget -c http://meanrat.com/media/30days/day$n.pdf; done |
This file contains 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
if ($?tcsh && $?prompt) then | |
bindkey "\e[1~" beginning-of-line # Home | |
bindkey "\e[7~" beginning-of-line # Home rxvt | |
bindkey "\e[2~" overwrite-mode # Ins | |
bindkey "\e[3~" delete-char # Delete | |
bindkey "\e[4~" end-of-line # End | |
bindkey "\e[8~" end-of-line # End rxvt | |
endif |
This file contains 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
wget -S -O - http://this/is/a/url |
This file contains 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
sudo /Applications/Install\ OS\ X\ Mavericks.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Applications/Install\ OS\ X\ Mavericks.app --nointeraction |
This file contains 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
android { | |
signingConfigs { | |
release | |
} | |
buildTypes { | |
release { | |
signingConfig signingConfigs.release | |
} |
This file contains 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 repo to intitalize different branches | |
$ mkdir /repos/aosp-1.6_r1 | |
$ cd /repos/aosp-1.6_r1 | |
$ repo init -b android-1.6_r1 -u https://android.googlesource.com/platform/manifest --reference=/repos/aosp-main | |
$ repo sync | |
Switch to another branch | |
$ mkdir /repos/aosp-1.6_r2 |
This file contains 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
# Assume in.pdf has 100 pages | |
pdftk in.pdf cat 100-1 output out.pdf |