This is a mirror of graphviz-dot-mode for MELPA.
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
require 'benchmark' | |
N = 10_000_000 | |
S = 'string,' * N | |
Benchmark.bmbm do |x| | |
x.report('#count') do | |
(length = S.count(',')) && (length + 1).times{|i| "line #{i} of #{length}" } | |
end |
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
source :rubygems | |
gem 'sinatra' | |
gem 'shotgun', :group => :development |
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
<?xml version="1.0"?> | |
<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> | |
<fontconfig> | |
<match target="font"> | |
<edit name="rgba" mode="assign"> | |
<const>rgb</const> | |
</edit> | |
</match> | |
<match target="font"> | |
<edit name="hintstyle" mode="assign"> |
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
100000 | |
99999 | |
99998 | |
99997 | |
99996 | |
99995 | |
99994 | |
99993 | |
99992 | |
99991 |
dupx is a shell script to redirect an existing process STDOUT
or STDIN
to a file. Unfortunately, I was getting this error after invoking dupx -o /tmp/some.log PID
:
/tmp/gdbcmd.F8Qf:5: Error in sourced command file:
Unable to call function "dup2" at 0x7fff96e233b8: no return type information available.
To call this function anyway, you can cast the return type explicitly (e.g. 'print (float) fabs (3.0)')
Success
I found a handy Gist that did mostly what dupx
does, toyed with it in GDB, and then modified the original dupx
script to add (int)
type casting in the open, dup, dup2, close, and write calls.
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
# This all assumes you have the process running in | |
# a terminal screen and you're on Linux-like system. | |
# First off, suspend the process and background it | |
ctrl-z # suspend the process | |
bg # restart/continue the process in the background | |
# Now create files to log to. They can be called anything, | |
# Personally I would end the in .log. E.g. could be | |
# /var/logs/myprocess-stdout.log, |
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
diff --git a/src/ChangeLog b/src/ChangeLog | |
index 37cd344..c121bfb 100644 | |
--- a/src/ChangeLog | |
+++ b/src/ChangeLog | |
@@ -1,3 +1,9 @@ | |
+2011-07-11 Bob Halley <[email protected]> | |
+ | |
+ * nsterm.m (initFrameFromEmacs): In OS X 10.7, a title bar | |
+ is no longer implied by NSResizableWindowMask and must be | |
+ requested with NSTitledWindowMask. |
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
#!/usr/bin/env python | |
""" | |
A poor man's directory tree for systems without the `tree` command. | |
:Author: Jon-Michael Deldin <[email protected]> | |
:Date: 2009-03-19 19:03 -0600 | |
""" | |
import sys |
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
<txp:php> | |
// <? | |
// build a list of file categories | |
$rs = safe_query('select distinct category | |
from ' . safe_pfx('txp_file') . ' | |
order by category asc', 1); | |
if ($rs) | |
{ | |
while ($row = mysql_fetch_array($rs, MYSQL_NUM)) | |
{ |