This file contains 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
# sshd+nginx | |
# | |
# VERSION 0.0.1 | |
FROM ubuntu | |
RUN apt-get update | |
# sshd | |
RUN apt-get install -y openssh-server |
This file contains 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
"loadavg5", | |
"memory.total", | |
"memory.free", | |
"memory.buffers", | |
"memory.cached", | |
"memory.swap_cached", | |
"memory.active", | |
"memory.inactive", | |
"memory.swap_total", | |
"memory.swap_free", |
This file contains 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 perl | |
# crontab -l | ./cron2cal > ~/tmp/cron.csv | |
use utf8; | |
use strict; | |
use warnings; | |
use Encode; | |
use DateTime; |
This file contains 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 | |
PATH=$HOME/homebrew/bin:$PATH | |
if [ -n "$TMUX" ]; then | |
echo "already in tmux session!!" | |
exit | |
fi | |
HELPER_RUNNING=$(ps aux | grep "[u]im-tmux-helper" 2>/dev/null) |
This file contains 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 blosxom.cgi blosxom.cgi | |
index 8ffe7ae..0fb7041 100755 | |
--- blosxom.cgi | |
+++ blosxom.cgi | |
@@ -764,6 +764,30 @@ sub generate { | |
} | |
} | |
+ # Save unescaped versions and allow them to be used in flavour | |
+ # templates. |
This file contains 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
function in_place_history_keyword_completion() { | |
pos=CURSOR # 現在のカーソル位置を取得 | |
selected=$(history -10000 | cut -d' ' -f3- | tr '|' ' ' | tr ' ' '\n' | sort -u | peco) # 選択した結果 | |
BUFFER="${BUFFER[1,$pos]}${selected}${BUFFER[$pos,-1]}" | |
CURSOR=$#BUFFER # move cursor | |
zle -R -c # refresh | |
} | |
zle -N in_place_history_keyword_completion | |
bindkey '^R' in_place_history_keyword_completion |
This file contains 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
$ cat ipv4addr.c | |
#include <stdio.h> | |
struct ct_printf_t { | |
char *str; | |
size_t off; | |
}; | |
struct ct_printf_t ct_printf_init(char *str) | |
{ |
This file contains 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
function! s:package_name() | |
let mx = '^\s*package\s\+\([^ ;]\+\)' | |
for line in getline(1, 5) | |
if line =~ mx | |
return substitute(matchstr(line, mx), mx, '\1', '') | |
endif | |
endfor | |
return "" | |
endfunction |
This file contains 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
package MyFinger; | |
use Filter::Simple; | |
FILTER_ONLY | |
code => sub { | |
s/(\$[a-zA-Z][a-zA-Z0-9]*\s*)☞/\1->/msxg; | |
s/([a-zA-Z][a-zA-Z0-9]*\s*)☛/\1=>/msxg; | |
}; | |
1; |
This file contains 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
// gcc -o closure-counter closure-counter.c -lffi | |
#include <stddef.h> | |
#include <string.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <ffi.h> | |
int | |
main(int argc, char **argv) { | |
ffi_cif cif; |
OlderNewer