Skip to content

Instantly share code, notes, and snippets.

kunst1080 kunst1080

Block or report user

Report or block kunst1080

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View packages.config
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="lhaplus" />
<package id="windowslivemail" />
<package id="adobereader" />
<package id="googlejapaneseinput" />
<package id="git" />
<package id="google-chrome-x64 " />
<package id="firefox" />
@kunst1080
kunst1080 / server
Last active Aug 29, 2015
simple server
View server
#!/usr/local/bin/python
import socket
import os
from subprocess import Popen, PIPE
PORT_NO = 8080
HOSTNAME = ''
SCRIPT = "listen"
def main():
@kunst1080
kunst1080 / ans1.c
Created Jan 8, 2015
Answers for POH4 (パイザオンラインハッカソン4・Lite エン恋 POH4Lite : https://paiza.jp/poh/enkoi)
View ans1.c
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main() {
char buf[15], *token1;
int i, count, n, sum;
sum = 0;
fgets(buf, sizeof(buf), stdin);
View archsetup.sh
NEWHOSTNAME=$1
ROOTPASSWD=$2
# Keymap
loadkeys jp106
# Setup HDD
parted /dev/sda mklabel gpt
parted /dev/sda mkpart primary btrfs 1049KB 8591MB
parted /dev/sda mkpart primary linux-swap 8591MB 10.7GB
@kunst1080
kunst1080 / refresh-resolvconf.sh
Created Sep 7, 2014
refresh resolv.conf and copy to Jail prisoners and Jail flavors
View refresh-resolvconf.sh
#!/bin/sh
readonly PREFIX=/usr/jails
resolvconf -u
ls $PREFIX/*/etc/resolv.conf | xargs -I@ cp -v /etc/resolv.conf @
ls $PREFIX/flavors/*/etc/resolv.conf | xargs -I@ cp -v /etc/resolv.conf @
resolvconf -l
@kunst1080
kunst1080 / create_jail.sh
Last active Aug 29, 2015
Create FreeBSD Jail with qjail(8), using user flavor and inital script.
View create_jail.sh
#!/bin/sh
USAGE(){
cat <<++EOS >&2
USAGE:`basename $0` jail_name ip_address user_flavor [ -y root_password default_user default_user_password ]
++EOS
}
# const
PREFIX=/usr/jails
@kunst1080
kunst1080 / create_jail.sh
Created Aug 25, 2014
Create FreeBSD Jail with qjail(8)
View create_jail.sh
#!/bin/sh
USAGE(){
cat <<++EOS >&2
USAGE:`basename $0` jail_name ip_address flavor [ -y root_password default_user default_user_password ]
++EOS
}
# Const
NIC=em1
@kunst1080
kunst1080 / anubis.sh
Created Jul 8, 2014
2014-07-05 暇をもてあましたアヌビス神の遊び
View anubis.sh
#!/bin/bash
WORKDIR=anubis
mkdir -p $WORKDIR
cat Data.csv | awk 'NR>1' | tr ',' '/' | xargs -I% echo mkdir -p $WORKDIR/% | sh
function spread() {
echo "<td rowspan=\"`find "$2" | wc -l`\">$1</td>"
ls "$2" | while read L
@kunst1080
kunst1080 / gist:388fdea590b7bbf99e7f
Last active Oct 20, 2015
PlayFramework学習のための関連のリンクまとめ
View gist:388fdea590b7bbf99e7f
View jd.rb
# 仕様:
# ホーム画面の領域を「field」とする。
# fieldは[縦][横]の2次元配列。
# fieldの各マスについて、配置できるウィジェットの高さ毎の最大横幅を持を格納した2次元配列を「fmap」とし、
# 縦幅と最大横幅ごとに配置可能なマスの数を集計したものを「wctable」とする。
#
# ホーム画面に配置するウィジェットの属性を「widget」とし、その配列を「widgets」とする。
#
# 判定について
# fieldのマスに対し、widgetをいくつ配置できるか判定する
You can’t perform that action at this time.