Skip to content

Instantly share code, notes, and snippets.

View petrhosek's full-sized avatar

Petr Hosek petrhosek

View GitHub Profile
@petrhosek
petrhosek / gist:1061133
Created July 2, 2011 16:37
Default comment display for Colladoc
diff --git a/src/main/scala/scala/tools/colladoc/model/mapper/Comment.scala b/src/main/scala/scala/tools/colladoc/model/mapper/Comment.scala
index aec1bd9..05ae65e 100644
--- a/src/main/scala/scala/tools/colladoc/model/mapper/Comment.scala
+++ b/src/main/scala/scala/tools/colladoc/model/mapper/Comment.scala
@@ -123,7 +123,7 @@ object Comment extends Comment with LongKeyedMetaMapper[Comment]
* @return default change if exists, none otherwise
*/
def default(qualName: String) = Comment.findAll(By(Comment.qualifiedName, qualName),
- By(Comment.valid, true), By(Comment.active, true),
+ By(Comment.valid, true), NotNullRef(Comment.active), By(Comment.active, true),
@petrhosek
petrhosek / gist:1117225
Created July 31, 2011 21:27 — forked from ignatov/gist:1117196
Defaul props for Tomcat
# Application properties
-doc-title=Scala Standard Library
-doc-version=development
-doc-source-url=https://codereview.scala-lang.org/fisheye/browse/scala-svn/scala/trunk/€{FILE_PATH}.scala?r=HEAD
-sourcepath=/data/tomcat6/scala-trunk/src/actors:/data/tomcat6/scala-trunk/src/library:/data/tomcat6/scala-trunk/src/swing
-classpath=/data/tomcat6/scala-trunk/build/pack/lib/scala-library.jar:/data/tomcat6/scala-trunk/build/pack/lib/scala-compiler.jar:/data/tomcat6/scala-trunk/build/pack/lib/scala-swing.jar
if [ -f ~/.zshrc ]; then
source ~/.zshrc
fi
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"
export NODE_PATH=/usr/local/lib/node_modules
export PATH=$PATH:$HOME/.local/bin
[alias]
# commit
ca = commit -am
amend = commit --amend
# log
graph = log --graph --date=short
changes = log --pretty=format:\"%h %cr %cn %Cgreen%s%Creset\" --name-status
short = log --pretty=format:\"%h %cr %cn %Cgreen%s%Creset\"
changelog = log --pretty=format:\" * %s\"
# reset
@petrhosek
petrhosek / pref.js
Created July 1, 2013 00:07
Set up Chrome Secure Shell to handle Base16 Default terminal colors
// Disable bold.
term_.prefs_.set('enable-bold', false);
// Use this for base16-default.
term_.prefs_.set('background-color', "#151515");
term_.prefs_.set('foreground-color', "#d0d0d0");
term_.prefs_.set('cursor-color', '#d0d0d0');
term_.prefs_.set('color-palette-overrides', [
'#151515',
--- lss.h 2013-04-10 01:28:04.000000000 +0100
+++ linux_syscall_support.h 2013-03-28 15:53:11.131754894 +0000
@@ -103,8 +103,11 @@
#include <signal.h>
#include <stdarg.h>
#include <stddef.h>
-#include <stdint.h>
+#if !defined(_KERNEL) && !defined(_STANDALONE)
#include <string.h>
+#else
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
CLOUD_CONFIG_PATH = "./user-data"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "packer_coreos-alpha_cloudstack"
config.ssh.username = "core"
@petrhosek
petrhosek / tmux.conf
Created January 16, 2015 16:39
Irssi Tmux integration
new-window -n irssi irssi
split-window -h -p15 -t0 ‘/bin/cat ~/.irssi/nicklistfifo’
send-keys -t1 "tmux send-keys -t0 \"irssi\" C-m; \
tmux send-keys -t0 \"/set nicklist_height \$(stty size | cut -f1 -d' ' -)\" C-m; \
tmux send-keys -t0 \"/set nicklist_width \$(stty size | cut -f2 -d' ' -)\" C-m; \
tmux send-keys -t0 \"/nicklist fifo\" C-m; \
cat ~/.irssi/nicklistfifo" C-m
select-pane -t
@petrhosek
petrhosek / test-rsize.gnuplot
Last active May 11, 2016 19:17
LLVM MC bundle emission memory usage
#!/usr/bin/gnuplot
set xlabel "Input size"
set ylabel "Output size"
set terminal dumb size 200,80
plot 'test.dat' using 1:2 with lines
ELF Header:
Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00
Class: ELF64
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: EXEC (Executable file)
Machine: Advanced Micro Devices X86-64
Version: 0x1