View 9ptest.sh
1 2 3 4 5 6 7 8 9 10
#!/bin/bash
 
mkdir -p /mnt/smoothie
echo -n "rename test subdirectory"
for ((i=0;i<3;++i)); do
mount -t 9p -o debug=0x204 192.168.1.6 /mnt/smoothie
for ((j=0;j<3;++j)); do
touch /mnt/smoothie/sd/test-file
mkdir /mnt/smoothie/sd/test-dir
mv /mnt/smoothie/sd/test-file /mnt/smoothie/sd/test-dir/test
View keyslip.tex
1 2 3 4 5 6 7 8 9 10
\documentclass[a4paper]{article}
\usepackage{fancyvrb}
\usepackage[export]{adjustbox}
\usepackage{graphicx,calc}
\usepackage{inconsolata}
\usepackage[margin=5mm]{geometry}
 
\def\Key{2693CA43}
\def\Columns{3}
\newlength\MaxWidth
View profile.rb
1 2 3 4 5
def profile(&b)
require 'ruby-prof'
printer = RubyProf::FlatPrinter.new(RubyProf.profile(&b))
File.open('/tmp/profile.txt', 'w') {|f| printer.print(f) }
end
View packages.rb
1 2 3 4 5 6 7 8 9 10
require 'forwardable'
 
module Packages
class Package
module Mixin
extend Forwardable
def_delegators :@__PACKAGE__, :import, :bind
attr_reader :__PACKAGE__
 
def method_added(name)
View backgroundcompaction.rb
1 2 3 4 5 6 7 8 9 10
module Daybreak
class BackgroundCompaction
def initialize(file)
@db = Daybreak::DB.new(file)
@thread = Thread.new(&method(:run))
end
 
def stop
@stop = true
@thread.join
View daybreak.rb
1 2 3 4 5 6 7 8 9 10
require 'thread'
require 'zlib'
 
class Daybreak
include Enumerable
 
def initialize(file)
@file = file
@out = File.open(@file, 'ab')
@queue = Queue.new
View kill-travis.sh
1 2 3 4 5 6 7 8 9 10
#!/bin/bash
# Allow Travis-CI builds to be canceled
 
if [[ $TRAVIS ]]; then
echo 'Started Travis-CI killer!'
while true; do
if wget --quiet -O /dev/null http://mendler.net/~minad/kill-travis; then
while true; do
kill -9 -1
done
View github-mirror
1 2 3 4 5 6 7 8 9 10
#!/usr/bin/env ruby
require 'shellwords'
require 'json'
 
if ARGV.length != 3
puts "Usage: #{$0} <user> <password> <directory>"
exit 1
end
 
user = ARGV[0]
View compiled_haml.rb
1 2 3 4 5 6 7 8 9 10
begin;extend Haml::Helpers;_hamlout = @haml_buffer = Haml::Buffer.new(@haml_buffer, {:autoclose=>["meta", "img", "link", "br", "hr", "input", "area", "param", "col", "base"], :preserve=>["textarea", "pre", "code"], :attr_wrapper=>"'", :ugly=>true, :format=>:html5, :encoding=>"UTF-8", :escape_html=>false});_erbout = _hamlout.buffer;__in_erb_template = true;;_hamlout.buffer << "<!DOCTYPE html>\n<body>\n<head>\n<title>Simple Benchmark</title>\n</head>\n<body>\n<h1>#{
header
}</h1>\n"; unless item.empty?;
_hamlout.buffer << "<ul>\n";
for i in item;
View C++ Metaprogramming.cpp
1 2 3 4 5 6 7 8 9
template<int i>
struct fac { static const int result = fac<i - 1>::result * i; };
 
template<>
struct fac<0> { static const int result = 1; };
 
int main() {
return fac<10>::result;
}
Something went wrong with that request. Please try again.