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
#include <fcntl.h> | |
#include <linux/fs.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <sys/ioctl.h> | |
#include <sys/stat.h> | |
#include <sys/time.h> | |
#include <sys/types.h> | |
#include <unistd.h> |
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
#include <fcntl.h> | |
#include <linux/fs.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <sys/ioctl.h> | |
#include <sys/stat.h> | |
#include <sys/types.h> | |
#include <unistd.h> | |
int main(int argc, char *argv[]) { |
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
(defmacro with-suppressed-message (&rest body) | |
"Suppress new messages temporarily in the echo area and the `*Messages*' buffer while BODY is evaluated." | |
(declare (indent 0)) | |
(let ((message-log-max nil)) | |
`(with-temp-message (or (current-message) "") ,@body))) |
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 'drb/drb' | |
require 'thread' | |
q = DRbObject.new_with_uri('druby://localhost:12345') | |
q.push 1 |
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
#include <fcntl.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <sys/stat.h> | |
#include <sys/time.h> | |
#include <sys/types.h> | |
#include <unistd.h> | |
inline void xgettimeofday(struct timeval *tv) { | |
if (gettimeofday(tv, NULL) == -1) { |
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
class Tree | |
attr_accessor :root | |
def search_for_node(value) | |
@root.search_self_and_children value | |
end | |
end | |
class Node | |
attr_accessor :value, :children |
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/Library/Formula/go.rb b/Library/Formula/go.rb | |
index d085bb1..33d71db 100644 | |
--- a/Library/Formula/go.rb | |
+++ b/Library/Formula/go.rb | |
@@ -45,7 +45,7 @@ class Go < Formula | |
['darwin', ['386', 'amd64']], | |
] | |
else | |
- targets = [['darwin', ['']]] | |
+ targets = [['linux', ['']]] |
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
#!/bin/sh | |
set -eu | |
cd $(dirname $0) | |
if [ $# -ne 1 ]; then | |
echo "Usage: [$0] directory" | |
exit | |
fi | |
cd $1 |
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
#!/bin/sh | |
set -eu | |
cd $(dirname $0) | |
join_sar() { | |
local cpu_out=sar_cpu$1.out | |
local io_out=sar_io$1.out | |
local sar_out=sar$1.out | |
local cpu_out_temp=$cpu_out.temp | |
local io_out_temp=$io_out.temp |
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
#!/bin/sh | |
set -eu | |
cd $(dirname $0) | |
if [ $# -ne 1 ]; then | |
echo "Usage: [$0] directory" | |
exit | |
fi | |
cd $1 |