Skip to content

Instantly share code, notes, and snippets.

View tckz's full-sized avatar
🌵

tckz

🌵
View GitHub Profile
@tckz
tckz / standby.ps1
Created March 31, 2010 04:22
Enter standby state.
[reflection.assembly]::LoadWithPartialName("System.Windows.Forms") | out-null
[System.Windows.Forms.Application]::SetSuspendState([System.Windows.Forms.PowerState]::Suspend, $false, $false);
@tckz
tckz / save_as_html.ps1
Created July 27, 2010 10:03
powershellでword文書をhtml一括保存
[reflection.assembly]::LoadWithPartialName("Microsoft.Office.Interop.Word") | out-null
$word = new-object Microsoft.Office.Interop.Word.ApplicationClass
$word.Visible = $true
foreach($arg in $args)
{
foreach($doc in (Get-Item $arg))
{
$fn_doc = $doc.FullName
$word_doc = $word.Documents.Open($fn_doc, $false, $false)
@tckz
tckz / gist:552821
Created August 27, 2010 05:00
ktpassメモ
AESでktpass
ktpass -princ HTTP/[email protected] -mapuser http-somehost -crypto AES256-SHA1 -ptype KRB5_NT_SRV_HST +rndPass -out somehost.keytab
RC4でktpassして2008 DCに対してkinitするとき
[libdefaults]
default_tkt_enctypes = rc4-hmac
default_tgs_enctypes = rc4-hmac
kinit(v5): Key table entry not found while getting initial credentials
@tckz
tckz / gist:569544
Created September 8, 2010 02:59
GAE向けのbuild.xmlでproxy
JVM系
<target name="run" depends="compile"
description="Starts the development server.">
<dev_appserver war="war" port="3000" address="0.0.0.0">
<options>
<arg value="--jvm_flag=-Dhttps.proxyHost=proxy.example.com" /> <arg value="--jvm_flag=-Dhttps.proxyPort=8080" />
</options>
</dev_appserver>
</target>
@tckz
tckz / DummyChan.java
Created December 19, 2010 12:00
引数をダンプするダミー
package com.example;
import javax.swing.JEditorPane;
import javax.swing.JFrame;
import javax.swing.JScrollPane;
import java.awt.Container;
@SuppressWarnings("serial")
public class DummyChan extends JFrame{
@tckz
tckz / gist:1986082
Created March 6, 2012 12:45
gitとauthorized_keys
command="perl -e 'exec qw(git-shell -c), $ENV{SSH_ORIGINAL_COMMAND}'",no-port-forwarding,no-agent-forwarding,no-X11-forwarding,no-pty ssh-rsa aaaaaaaaaaaaaaaaaaaaaaaaa [email protected]
@tckz
tckz / MultiSCM対応版
Last active October 5, 2015 16:18
jenkinsでジョブがチェックアウトするブランチを一括設定する
jenkins.model.Jenkins.instance.items.findAll{job ->
job.name =~ /^some$/;
}.each { job ->
def modBranch = {scm ->
if (scm?.getType() =~ "GitSCM") {
// scm.properties.each{it -> println(it)};
branches = scm.getBranches()
if (branches?.size > 0) {
println("${job.name}(${scm.scmName})=${branches[0].name}");
@tckz
tckz / .screenrc
Last active January 4, 2016 06:29
rcファイル
#hardstatus alwayslastline "%w"
shelltitle "$ |tcsh"
hardstatus alwayslastline "%H: %`%-w%{=b bw}%n %t%{-}%+w"
bind s # reset s key
bind ^U encoding utf8
bind ^E encoding euc
bind ^S encoding sjis
#caption always "%{= wk} %-w%{=bu dr}%n %t%{-}%+w %= %{=b wb}%y/%m/%d(%D) %{=b wb}%c"
defscrollback 1000
#hardstatus alwayslastline "%H: %w"
@tckz
tckz / deploy.bat
Created November 15, 2012 09:50
SSRSにレポート配置
@echo off
set RS_EXE="C:\Program Files\Microsoft SQL Server\110\Tools\Binn\rs.exe"
cd %~dp0
@rem For newer endpoint. -e Mgmt2010
%RS_EXE% -i deploy.rss -s http://IPorHostname/reportserver -v filePath=. -v parentFolder=/ -v "dataSourcePath=/データ ソース/" -v dataSourceName=SomeName
if errorlevel 1 (
@tckz
tckz / gist:4994696
Last active December 13, 2015 23:49
node.jsでhttpリクエストとwebsocket両方をreverse proxy
var http = require('http'),
httpProxy = require('http-proxy');
// Proxy to rails app
var proxy1 = new httpProxy.HttpProxy({
target: {
host: 'localhost',
port: 3000
}
});