start new:
tmux
start new with session name:
tmux new -s myname
| -- This creates a shim Application that will enable you to open files from the Finder in vim using iTerm | |
| -- To use this script: | |
| -- 1. Open Automator and create a new Application | |
| -- 2. Add the "Run Applescript" action | |
| -- 3. Paste this script into the Run Applescript section | |
| -- 4. Save the application as TerminalVim.app in your Applications folder | |
| -- 5. In the Finder, right click on a file and select "Open With". In that window you can set TerminalVim as a default | |
| -- Improved with chaning PWD |
| <?php | |
| // get a copy of rss2html.php from https://gist.github.com/zma/270b179926971b431e8c and put it at the same directory as this php script | |
| include_once("rss2html.php"); | |
| // output RSS feed to HTML | |
| output_rss_feed('http://feeds.systutorials.com/systutorials/', 20, true, true, 200); | |
| ?> |
Picking the right architecture = Picking the right battles + Managing trade-offs
| // Get Available Filesystem Space on Linux | |
| // A tutorial on this can be found at | |
| // http://www.systutorials.com/136585/how-to-get-available-filesystem-space-on-linux-a-c-function-and-a-cpp-example/ | |
| // header for statvfs | |
| #include <sys/statvfs.h> | |
| // C++ I/O header | |
| #include <iostream> |
| class A { }; | |
| class B { }; | |
| class C: public A { }; | |
| class D: private C, public A, public B { }; | |
| int main () | |
| { | |
| D *d = new D; | |
| A *a1 = dynamic_cast<A *>(d); | |
| A *a2 = static_cast<A *>(d); |
| class A { }; | |
| class B { }; | |
| class C: public A { }; | |
| class D: private A, public B { }; | |
| int main () | |
| { | |
| D *d = new D; | |
| A *a1 = dynamic_cast<A *>(d); | |
| A *a2 = static_cast<A *>(d); |
| <?php | |
| // Check http://www.systutorials.com/136102/a-php-function-for-fetching-rss-feed-and-outputing-feed-items-as-html/ for description | |
| // RSS to HTML | |
| /* | |
| $tiem_cnt: max number of feed items to be displayed | |
| $max_words: max number of words (not real words, HTML words) | |
| if <= 0: no limitation, if > 0 display at most $max_words words | |
| */ |
| /** | |
| Benchcoat.scala | |
| done: | |
| 2011-11-17 v.4: improvement in plot-code | |
| x-axis and y-axis needs description (how many units measured, time in second) | |
| 2011-11-17 v.3: minor improvement in plot-code | |
| 2011-10-22 v.2: improvement in plot-code and renaming prettyPrint | |
| extend Benchcoat by | |
| providing a List of ( |
| // Zhiqiang Ma (http://www.ericzma.com) | |
| #include <iostream> | |
| #include <iomanip> | |
| #include <vector> | |
| #include <queue> | |
| #include <set> | |
| #include <algorithm> | |
| #include <sys/time.h> |