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/bash | |
san="DNS:localhost, DNS:localhost.localdomain, IP:127.0.0.1, DNS:app, DNS:app.localdomain" | |
date=$(date -uI) | |
openssl genpkey -out tempca.key -outform PEM -algorithm RSA | |
openssl req -out tempca.csr -key tempca.key -subj "/CN=TempCA$date" -new | |
openssl x509 -req -days 366 -signkey tempca.key -in tempca.csr -outform der -out tempca.crt | |
openssl genpkey -out localhost.key -algorithm EC -pkeyopt "ec_paramgen_curve:prime256v1" | |
openssl req -new -sha256 -key localhost.key -subj "/CN=localhost" -outform pem -out localhost.csr |
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/bash | |
[[ -z $STATE ]] && export STATE=init | |
case "$STATE" in | |
init) | |
export STATE=unshare | |
sudo -E unshare -mpf "$0" | |
# cleanup が不要ならexecでも良い | |
exit 0 | |
;; |
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
FROM buildpack-deps:stretch | |
ARG VERSION=4.1.25 | |
WORKDIR /usr/src | |
RUN gpg --recv-keys 9F6F1C2D7E045F8D | |
RUN curl -sSLO https://www.nlnetlabs.nl/downloads/nsd/nsd-${VERSION}.tar.gz.asc | |
RUN curl -sSLO https://www.nlnetlabs.nl/downloads/nsd/nsd-${VERSION}.tar.gz | |
RUN gpg --verify nsd-${VERSION}.tar.gz.asc nsd-${VERSION}.tar.gz | |
RUN tar xzf nsd-${VERSION}.tar.gz |
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
function defvalue(fn, v) { | |
let ret; | |
try{ | |
ret = fn(); | |
}catch(e){ | |
ret = v; | |
} | |
if(ret === undefine){ | |
ret = v; | |
} |
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 | |
target="${0##*/keyfile-}" | |
m= | |
cleanup() { | |
[ -n "$m" ] && umount "$m" 1>&2 | |
} | |
init() { |
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 | |
# original script from http://forums.debian.net/viewtopic.php?f=5&t=119644#p564446 | |
PREREQ="mdadm cryptroot lvm2" | |
prereqs() | |
{ | |
echo "$PREREQ" | |
} |
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
--- update-gummiboot 2014-07-21 20:38:50.000000000 +0900 | |
+++ update-gummiboot.new 2015-02-01 16:10:59.329668858 +0900 | |
@@ -29,14 +30,16 @@ | |
} | |
install_kernel() { | |
- install -D /boot/vmlinuz-$KERNEL $GUMMIBOOT_EFI/$MACHINE_ID/$KERNEL/linux | |
+ esp=$1 | |
+ install -D /boot/vmlinuz-$KERNEL $esp/$MACHINE_ID/$KERNEL/linux | |
if [ -e /boot/initrd.img-$KERNEL ]; then |
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 <iostream> | |
// implement | |
template<class T> | |
void implement(T t){ | |
t++; | |
std::cout << t << std::endl; | |
} | |
//interface |
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
#-*- coding: utf-8 | |
Plugin.create :gray_protected_users do | |
UserConfig[:protected_users_background_color] ||= [0xcccc,0xcccc,0xcccc] | |
filter_message_background_color do | mp, array | | |
if mp.to_message.user[:protected] == true | |
array = UserConfig[:protected_users_background_color] | |
end | |
[mp, array] | |
end |