Skip to content

Instantly share code, notes, and snippets.

View n0ts's full-sized avatar
🏠
Working from home

Naoya Nakazawa n0ts

🏠
Working from home
  • Freelancer
  • Tokyo, Japan
  • X @n0ts
View GitHub Profile
@n0ts
n0ts / MySQL slave daly patch for MySQL 5.1.44
Created March 2, 2010 04:59
MySQL slave delay patch for MySQL 5.1.44
--- trunk/mysql/SOURCES/mysql-slave-delay-5.1.44.patch (rev 0)
+++ trunk/mysql/SOURCES/mysql-slave-delay-5.1.44.patch 2010-03-02 04:08:00 UTC (rev 71)
@@ -0,0 +1,84 @@
+diff -u mysql-5.1.44.bak/sql/mysqld.cc mysql-5.1.44/sql/mysqld.cc
+--- mysql-5.1.44.bak/sql/mysqld.cc 2010-02-04 20:39:50.000000000 +0900
++++ mysql-5.1.44/sql/mysqld.cc 2010-02-15 21:21:09.000000000 +0900
+@@ -523,6 +523,9 @@
+ ulong query_buff_size, slow_launch_time, slave_open_temp_tables;
+ ulong open_files_limit, max_binlog_size, max_relay_log_size;
+ ulong slave_net_timeout, slave_trans_retries;
#!/bin/sh
HANDBRAKE=/Applications/HandBrakeCLI
FFMPEG=/opt/local/bin/ffmpeg
INPUT=/Volumes/FRIENDS
OUTPUT=/Users/n0ts/Desktop
SERIES=$1
START_EPISODE=$2
if [ -z $1 ]; then
require 'rubygems'
require 'id3lib'
# Set file name
filename = ARGV[0]
exit unless FileTest.exists?(filename)
basename = File::basename(filename, '.mp3').scan(/.*_(.*)-(.*)/)
season = basename[0][0]
chapter = basename[0][1]
*nat
:PREROUTING ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
-A POSTROUTING -o eth0 -p tcp --dport 80 -m statistic --mode nth --every 4 -j SNAT --to-source 192.168.161.125
-A POSTROUTING -o eth0 -p tcp --dport 80 -m statistic --mode nth --every 3 -j SNAT --to-source 192.168.161.124
-A POSTROUTING -o eth0 -p tcp --dport 80 -m statistic --mode nth --every 2 -j SNAT --to-source 192.168.161.123
-A POSTROUTING -o eth0 -p tcp --dport 80 -m statistic --mode nth --every 1 -j SNAT --to-source 192.168.161.122
COMMIT
#!/bin/sh
MYSQL=/usr/bin/mysql
DATABASE="test"
SOCKET="/var/lib/mysql/mysql.sock"
# listed all tables
for table in `$MYSQL -u root $DATABASE -N -s -e 'show tables'`;
do
--- ruby.spec-org 2010-04-27 13:16:05.000000000 +0900
+++ ruby.spec 2010-05-13 07:09:41.000000000 +0900
@@ -1,13 +1,13 @@
%define rubyxver 1.8
-%define rubyver 1.8.6
-%define _patchlevel 399
+%define rubyver 1.8.7
+%define _patchlevel 249
%define dotpatchlevel %{?_patchlevel:.%{_patchlevel}}
%define patchlevel %{?_patchlevel:-p%{_patchlevel}}
#!/bin/sh
RUBY=/usr/bin/ruby
HANDBRAKE=/Applications/HandBrakeCLI
FFMPEG=/opt/local/bin/ffmpeg
INPUT=/Volumes/FRIENDS
OUTPUT=/Users/n0ts/Desktop
SERIES=$1
START_EPISODE=$2
require 'rubygems'
require 'id3lib'
require 'nokogiri'
require 'open-uri'
# Set file name
filename = ARGV[0]
exit unless FileTest.exists?(filename)
basename = File::basename(filename, '.mp3').scan(/.*_(.*)-(.*)/)
$ curl --head http://mixi.jp/
HTTP/1.1 200 OK
Date: Tue, 10 Aug 2010 09:08:33 GMT
Server: Apache
Last-Modified: Wed, 03 Mar 2010 02:00:24 GMT
Accept-Ranges: bytes
Content-Length: 2590
Connection: close
Content-Type: text/html
# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and
# sysctl.conf(5) for more details.
# Controls IP packet forwarding
net.ipv4.ip_forward = 0
# Controls source route verification
net.ipv4.conf.default.rp_filter = 0