Skip to content

Instantly share code, notes, and snippets.

View st63jun's full-sized avatar

Jun SAITO st63jun

View GitHub Profile

Keybase proof

I hereby claim:

  • I am st63jun on github.
  • I am st63jun (https://keybase.io/st63jun) on keybase.
  • I have a public key whose fingerprint is 4586 4CFE DF74 CC44 CC57 4653 98C2 A424 F1A6 2D35

To claim this, I am signing this object:

@st63jun
st63jun / winzip
Created November 5, 2017 03:31
Windows でも文字化けせずに開ける Zip ファイルを作るスクリプト
#!/bin/bash
#
# Windows でも文字化けせずに開ける Zip ファイルを作るスクリプト。
# convmv(1) と zip(1) と pwqgen(1) が必要です。
#
# SYNOPSIS
#
# $ # 普通のZipファイルを作る
# $ winzip foo.txt
@st63jun
st63jun / amavisd-virus-sender-whitelist.patch
Created December 20, 2016 09:24
AMaViS virus sender whitelisting hack
--- /usr/sbin/amavisd.orig 2016-12-20 17:47:33.587273253 +0900
+++ /usr/sbin/amavisd 2016-12-20 18:18:18.257693185 +0900
@@ -13926,7 +13926,8 @@
$r->recip_is_local($is_local ? 1 : 0); # canonical boolean, untainted
if (!defined($r->bypass_virus_checks)) {
my $bypassed_v = lookup2(0,$recip, ca('bypass_virus_checks_maps'));
- $r->bypass_virus_checks($bypassed_v);
+ my $whitelisted_v = lookup2(0,$sender, ca('whitelist_sender_maps'));
+ $r->bypass_virus_checks($whitelisted_v || $bypassed_v);
}
@st63jun
st63jun / flymake-java.el
Created March 12, 2012 11:59
Fix flymake+ant problem
;; 素のFlymakeでAntを使うとエラー吐くので,いくつか関数を書き換える必要があるっぽい.
(require 'flymake)
(setq flymake-allowed-file-name-masks
'(("\\.\\(?:c\\(?:pp\\|xx\\|\\+\\+\\)?\\|CC\\)\\'" flymake-simple-make-init)
("\\.xml\\'" flymake-xml-init)
("\\.html?\\'" flymake-xml-init)
("\\.cs\\'" flymake-simple-make-init)
("\\.p[ml]\\'" flymake-perl-init)
@st63jun
st63jun / ipa_security_alert.yml
Last active December 31, 2015 14:59
IPAの重要なセキュリティ情報の新着フィードをChatWorkにポスト
global:
timezone: Asia/Tokyo
cache:
base: /tmp
log:
level: info
plugins:
- module: SubscriptionFeed
config:
@st63jun
st63jun / chat_work.rb
Created December 17, 2013 11:24
Automatic::Plugin::Publish::ChatWork
# -*- coding: utf-8 -*-
# Name:: Automatic::Plugin::Publish::ChatWork
# Author:: Jun Saito <http://github.com/st63jun>
# Created:: Dec 17, 2013
# Updated:: Dec 17, 2013
# Copyright:: Copyright (c) 2013 Jun Saito.
# License:: Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0.
module Automatic::Plugin
require 'chatwork'
@st63jun
st63jun / format.rb
Created December 17, 2013 11:22
Automatic::Plugin::FIlter::Format
# -*- coding: utf-8 -*-
# Name:: Automatic::Plugin::Filter::Format
# Author:: Jun Saito <https://github.com/st63jun>
# Created:: Dec 17, 2013
# Updated:: Dec 17, 2013
# Copyright:: Copyright (c) 2013 Jun Saito.
# License:: Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0.
module Automatic::Plugin
class FilterFormat
@st63jun
st63jun / kill_ja_softuses_com.user.js
Last active December 31, 2015 03:18
Googleの検索結果から ja.softuses.com を消すユーザースクリプト
// ==UserScript==
// @name Kill ja.softuses.com
// @namespace https://gist.github.com/st63jun/7926169
// @description Googleの検索結果から ja.softuses.com を無慈悲に削除
// @include https://www.google.co.jp/*
// @include https://www.google.com/*
// @include https://encrypted.google.com/*
// @version 1
// @grant none
// ==/UserScript==
@st63jun
st63jun / .gitignore
Created November 15, 2013 11:17
.gitignore for WordPress Project
.htaccess
wp-content/uploads/
wp-content/blogs.dir/
wp-content/upgrade/
wp-content/backup-db/
wp-content/advanced-cache.php
wp-content/wp-cache-config.php
sitemap.xml
*.log
wp-content/cache/
@st63jun
st63jun / spa.html
Last active December 25, 2015 11:49
YOLP Local Search API
<!DOCTYPE html>
<html>
<head>
<title>Listing Spa</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="http://js.api.olp.yahooapis.jp/OpenLocalPlatform/V1/jsapi?appid=dj0zaiZpPU9Qc0t2NEFLTTBLMyZzPWNvbnN1bWVyc2VjcmV0Jng9MmM-"></script>
<script src="spot.js"></script>
</head>
<body>
<h3>Spot lists</h3>