This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja"> | |
<head> | |
<meta http-equiv="Content-Language" content="ja" /> | |
<meta http-equiv="Content-Type" content="text/html; charset=shift_jis" /> | |
<title>Sync Static Pages.</title> | |
<style type="text/css"> | |
<!-- | |
body { font-family: "Lucida Grande", "Hiragino Kaku Gothic Pro", Geneva, Arial, Verdana, sans-serif; } | |
.pre { width: 50%; background-color: #f3f3f3;} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ ruby | |
RAILS_ENV ||= "production" | |
require File.dirname(__FILE__) + '/../config/boot' | |
require RAILS_ROOT + '/config/environment' | |
con = ActiveRecord::Base.connection | |
con.execute "DELETE FROM sessions WHERE updated_at < '#{14.days.ago.to_s(:db)}'" | |
con.tables.each do |table| | |
con.execute "OPTIMIZE TABLE #{table}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rm -rf `find ./ -type d -name .svn ! -regex \.svn/. -print` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
USER="user" | |
PASSWD="password" | |
HOST="ipadress" | |
PORT=123456 | |
X_CMD(){ | |
local U=$1 ; shift | |
local PW=$1 ; shift |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# USAGE: | |
# echo "ほげ" | ruby send-gmail.rb | |
# | |
require 'rubygems' | |
require 'kconv' | |
require 'tmail' | |
require "tlsmail" | |
mail = TMail::Mail.new | |
mail.to = '[email protected]' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias la='ls -ah' | |
alias ll='ls -lhG' | |
alias lla='ls -alh' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat hogehoge.txt |sort |uniq -c |sort -r |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
cd $1 | |
ls=`ls` | |
for f in $ls | |
do | |
cat $f >> $2 | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Firewall configuration written by system-config-securitylevel | |
# Manual customization of this file is not recommended. | |
*filter | |
:INPUT DROP [0:0] | |
:FORWARD DROP [0:0] | |
:OUTPUT ACCEPT [0:0] | |
:RH-Firewall-1-INPUT - [0:0] | |
-A INPUT -j RH-Firewall-1-INPUT | |
-A FORWARD -j DROP | |
-A RH-Firewall-1-INPUT -i lo -j ACCEPT |
OlderNewer