Skip to content

Instantly share code, notes, and snippets.

View mail.sh
#!/usr/bin/expect
set FROM "amazon@example.net"
set TO "amazon@example.net"
set timeout 10
spawn openssl s_client -starttls smtp -crlf -quiet -connect email-smtp.us-east-1.amazonaws.com:587
send "EHLO amazon\n"
expect "250 Ok"
send "AUTH LOGIN\n"
View 20130513_checkmail.diff
--- check_mailman_qfiles.org 2013-05-13 17:01:56.000000000 +0900
+++ check_mailman_qfiles 2013-05-13 17:05:17.000000000 +0900
@@ -9,7 +9,6 @@
use strict;
use warnings;
-use File::Find::Rule;
use Getopt::Long;
my $qfiles_base = '/var/lib/mailman/qfiles';
@yaasita
yaasita / edit.rb
Last active Dec 23, 2015
Cookie Clicker
View edit.rb
#!/usr/bin/env ruby
# coding: utf-8
require 'pp'
require 'base64'
line = gets
line.chomp!
line.gsub!(/%21.+$/,"")
puts "=== cut ====="
puts line
View rsync.vbs
Option Explicit
'shellオブジェクト
Dim objWshShell
Set objWshShell = WScript.CreateObject("WScript.Shell")
'カレントディレクトリ変更
Dim objNetWork
Set objNetWork = WScript.CreateObject("WScript.Network")
Dim CYGHOME
View favorites.xml
<favorite>
<item id="0010"><name>NHK 総合</name><address> sop://broker.sinohao.com:3920/5378</address></item>
<item id="0011"><name>NHK 総合</name><address> sop://broker.sinohao.com:3920/591 </address></item>
<item id="0020"><name>NHK Eテレ</name><address> sop://broker.sinohao.com:3920/5375</address></item>
<item id="0021"><name>NHK Eテレ</name><address> sop://broker.sinohao.com:3920/592 </address></item>
<item id="0040"><name>日本テレビ</name><address> sop://broker.sinohao.com:3920/5376</address></item>
<item id="0041"><name>日本テレビ</name><address> sop://broker.sinohao.com:3920/593 </address></item>
<item id="0050"><name>テレビ朝日</name><address> sop://broker.sinohao.com:3920/5373</address></item>
<item id="0051"><name>テレビ朝日</name><address> sop://broker.sinohao.com:3920/595 </address></item>
<item id="0060"><name>TBSテレビ</name><address> sop://broker.sinohao.com:3920/5377</address></item>
View unlock
#!/usr/bin/suidperl
$ENV{PATH}="/usr/sbin/";
system "usermod --unlock sotossh" and die $!;
print <<"HTML";
Content-type: text/html;
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<html>
View vol1.pl
#!/usr/bin/perl
my (@item,@campaign);
{
my @head = split(/\s/,<STDIN>);
for (1..$head[0]){
$_=<STDIN>;
push(@item,$_);
}
for (1..$head[1]){
$_=<STDIN>;
@yaasita
yaasita / mail_report.pl
Last active Jan 3, 2016
Daily mail report
View mail_report.pl
#!/usr/bin/perl
use strict;
use warnings;
use File::Temp;
### Initial Settings #####################################################
my $mail_log='/var/log/mail.log*';
my $my_ip='192.168.0.1';
my $notify_address='admin@example.com';
my @rbl_sites=("all.rbl.jp","bl.spamcop.net","sbl.spamhaus.org");
@yaasita
yaasita / migemo.vim
Last active Aug 29, 2015
migemo on/off
View migemo.vim
command! Migemo call Migemo()
function! Migemo()
if hasmapto('\<CR>','c')
cunmap <expr><CR>
else
cnoremap <expr><CR> migemosearch#replace_search_word()."\<CR>"
endif
endfunction
View category_list.rb
# encoding: utf-8
#
# Month List for Octopress
module Jekyll
class CatList < Liquid::Tag
def initialize(tag_name, markup, tokens)
super
end
def render(context)