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
string data = "hello there"; | |
// standard stringstream extraction based on ' ' character | |
stringstream ss(data); | |
string extract1; | |
ss >> extract1; // hello | |
cout << extract1 << endl; | |
string extract2; | |
ss >> extract2; // there | |
cout << extract2 << endl; |
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
curl "http://www.gratisography.com/pictures/[1-88]H.jpg" -o "#1.jpg" |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>AllowedTypes</key> | |
<array> | |
<string>public.c-plus-plus-source</string> | |
</array> | |
<key>DefaultCompletionName</key> | |
<string>File</string> |
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
string ofSystem(string command){ | |
FILE * ret = NULL; | |
#ifdef TARGET_WIN32 | |
ret = _popen(command.c_str(),"r"); | |
#else | |
ret = popen(command.c_str(),"r"); | |
#endif | |
string strret; | |
char c; |
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
git fetch upstream | |
git checkout master | |
git merge upstream/master | |
git checkout develop | |
git merge upstream/master | |
// merge a branch into master | |
git checkout master | |
git pull origin master |
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
Raspberry PI | |
Cubieboard2 | |
Intel NUC | |
ODROID-U3 | |
Beaglebone Black | |
CuBox | |
UDOO | |
Jetson TK1 | |
HummingBoard | |
Brix Pro |
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
HWND handleWindow; | |
AllocConsole(); | |
handleWindow = FindWindowA("ConsoleWindowClass", NULL); | |
ShowWindow(handleWindow, 0); |
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
ls /dev/tty* |
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
DOWNLOAD A FILE (big O) | |
curl -O http://www.trentbrooks.com/index.html | |
DOWNLOAD A FILE TO DIRECTORY/FILENAME (little o) | |
curl -o GitProjects/thatpage.html http://www.trentbrooks.com/index.html | |
SEND FILE ATTACHMENT WITH GMAIL | |
curl smtps://smtp.gmail.com:465 -v --mail-from "[email protected]" --mail-rcpt "[email protected]" --ssl -u [email protected]:PASSWORD -T "test.txt" -k --anyauth | |
FORM POST: http://superuser.com/questions/149329/what-is-the-curl-command-line-syntax-to-do-a-post-request |
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
VIEW RUNNING APPS | |
top | |
SSH INTO MACHINE | |
ssh [email protected] | |
SSH REMOTE TO LOCAL COPY | |
scp [email protected]:/Users/trentbrooks/Desktop/150327_Background.png bg.png | |
SSH REMOTE TO LOCAL COPY (FOLDER + RECURSIVE) |