Skip to content

Instantly share code, notes, and snippets.

@nemf
nemf / roundcube0.94.patch
Created December 13, 2013 03:05
ISO-2022-JP-MS patch for roundcube 0.94
--- rcube_charset.php.org 2013-09-06 21:20:49.000000000 +0900
+++ rcube_charset.php 2013-12-13 11:27:54.000000000 +0900
@@ -177,6 +177,7 @@
static $mbstring_sch = null;
static $conv = null;
+ if(strcasecmp('iso-2022-jp', $from)===0) $from = 'ISO-2022-JP-MS';
$to = empty($to) ? RCUBE_CHARSET : $to;
$from = self::parse_charset($from);
@nemf
nemf / serial.bat
Created October 10, 2012 09:04
serial get
@echo off
for /F "skip=1 delims=" %%j in ('wmic bios get serialnumber') do (
set SERIAL=%%j
goto :DONE
)
:DONE
echo %SERIAL%
@nemf
nemf / gist:3794614
Created September 27, 2012 15:26
dhcp configuration for ipxe
# DHCP Server Configuration file.
# see /usr/share/doc/dhcp*/dhcpd.conf.sample
#
### iPXE-specific options
#
# http://www.ipxe.org/howto/dhcpd
#
option space ipxe;
option ipxe-encap-opts code 175 = encapsulate ipxe;
option ipxe.priority code 1 = signed integer 8;
@nemf
nemf / gist:3794569
Created September 27, 2012 15:17
ipxe, wimboot
## ipxe
git clone http://git.ipxe.org/ipxe.git
cd src
make bin/undionly.kpxe
cp bin/undionly.kpxe /tftpboot
## wimboot
git clone http://git.ipxe.org/wimboot.git
cd wimboot
cp -p wimboot /tftpboot
@nemf
nemf / smb.conf
Created September 26, 2012 13:46
samba annoymous share
[global]
guest account = nobody
map to guest = bad user
[tftpboot]
browsable = yes
path = /tftpboot
public = yes
writable = yes
guest ok = yes
vbell off
autodetach on
defscrollback 9999
caption always "%{= kw}%-w%{= BW}%n %t%{-}%+w %-= %c"
#!ipxe
imgfree
chain http://${next-server}/switch-pxe.php?serial=${serial:uristring} || shell
@nemf
nemf / gist:3109649
Created July 14, 2012 06:09
Minimal Kickstart for CentOS 6.3
install
url --url http://ftp.iij.ad.jp/pub/linux/centos/6.3/os/x86_64/
# if you use proxy
# url --url http://ftp.iij.ad.jp/pub/linux/centos/6.3/os/x86_64/ --proxy http://proxy-ip:8080/
lang en_US.UTF-8
keyboard us
network --bootproto=dhcp
rootpw password
firewall --disabled
authconfig --enableshadow --passalgo=sha512
@nemf
nemf / sparkleshare
Created June 10, 2012 08:44
SparkleShare Dashboard Start/Stop Script
#!/bin/sh
# chkconfig: - 85 15
### BEGIN INIT INFO
# Version : 0.2
# Author : Fabrice MARCHAL
# Provides: sparkleshare
# Short-Description: SparkleShare Dashboard
# Description: Launches the SparkleShare Dashboard as service.
@nemf
nemf / config.js
Created June 10, 2012 08:35
config.js for SparkleShare Dashboard
// Dashboard から管理したい git レポジトリの path を指定します。
// pub: true -> 認証なしでみれる
// pub: false -> 認証ないとみれない
//
exports.folders = [
{ type: 'git', name: 'Public GIT folder', path: '/home/nexus/Desktop/play/SparkleDashboard-x/repos/g1', pub: true },
{ type: 'git', name: 'Private GIT folder', path: '/home/nexus/Desktop/play/SparkleDashboard-x/repos/g2', pub: false }
];
// Listen する IP, Port の指定