start new:
tmux
start new with session name:
tmux new -s myname
| -module(bench). | |
| -compile(export_all). | |
| %% Luke Gorrie's favourite profiling macro. | |
| -define(TIME(Tag, Expr), | |
| (fun() -> | |
| %% NOTE: timer:tc/4 does an annoying 'catch' so we | |
| %% need to wrap the result in 'ok' to be able to | |
| %% detect an unhandled exception. | |
| {__TIME, __RESULT} = |
| SUMMARY | |
| I like to use kcachegrind for doing profiling on my ruby code. Most of my development | |
| is done on OSX, and while you can install kcachegrind via macports, it takes forever | |
| because it has to build KDE, as well. Much to my surprise, the fine folks who | |
| wrote kcachegrind also made a QT version, qcachegrind. I was able to build this on | |
| OSX without too much effort, only having to install QT and GraphViz. Yippie! | |
| I'm running OSX 10.6.7, with Xcode 4. My default gcc/g++ version is 4.2. I'm sure | |
| it will build just fine on earlier versions of Xcode, but I haven't tested it. |
| import com.petebevin.markdown.MarkdownProcessor | |
| import org.xhtmlrenderer.pdf.ITextRenderer | |
| import org.ccil.cowan.tagsoup.Parser | |
| import org.apache.xalan.xsltc.trax.SAX2DOM | |
| import org.xml.sax.InputSource | |
| buildscript{ | |
| repositories { | |
| mavenCentral() | |
| mavenRepo urls: "http://scala-tools.org/repo-releases" |
| import javafx.scene.layout.StackPane; | |
| import javafx.scene.web.WebView; | |
| /** | |
| * A syntax highlighting code editor for JavaFX created by wrapping a | |
| * CodeMirror code editor in a WebView. | |
| * | |
| * See http://codemirror.net for more information on using the codemirror editor. | |
| */ | |
| public class CodeEditor extends StackPane { |
| Navigation: | |
| cmd-p Goto Anything ('@' for functions, ':' for line number) | |
| cmd-r Function finder | |
| ctl-g Goto line number | |
| cmd-sft-p Command palette | |
| cmd-sft-f Find in Files | |
| cmd-opt-r Toggle regex when finding | |
| cmd-opt-# Columns | |
| ctr-# Switch columns |
| import sublime | |
| import sublime_plugin | |
| class NumberCommand(sublime_plugin.TextCommand): | |
| def run(self, edit): | |
| selection = self.view.sel() | |
| for region in selection: | |
| try: | |
| value = int(self.view.substr(region)) | |
| self.view.replace(edit, region, str(self.op(value))) |
| %%% Run with 'escript app_deps.erl' | |
| %%% Change the path in filelib:wildcard/1 as required to capture all | |
| %%% your dependencies. | |
| %%% | |
| %%% Rectangular nodes will represent library apps (no processes involved) | |
| %%% and the circular nodes will represent regular apps. An arrow going from | |
| %%% 'A -> B' means 'A depends on B'. | |
| %%% | |
| %%% This script depends on graphviz being present on the system. | |
| -module(app_deps). |