This file contains 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
from bs4 import BeautifulSoup | |
import os.path | |
import glob | |
os.chdir('c:\\temp\\swing\\') | |
for f in glob.glob('*.info'): | |
baseFile = os.path.basename(f) | |
srcName = os.path.splitext(baseFile)[0] |
This file contains 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
/* | |
DebugLog for Objective-C | |
from http://stackoverflow.com/questions/300673/is-it-true-that-one-should-not-use-nslog-on-production-code/302246#302246 | |
paste in .pch | |
*/ | |
#define DEBUG_MODE | |
#ifdef DEBUG_MODE | |
#define DebugLog( s, ... ) NSLog( @"<%p %@:(%d)> %@", self, [[NSString stringWithUTF8String:__FILE__] lastPathComponent], __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__] ) |
This file contains 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
UIWindow *window = [UIApplication sharedApplication].keyWindow; | |
ViewController *rootViewController = window.rootViewController; | |
DebugLog(@"%@", rootViewController.myWebView); |
This file contains 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 | |
rdate -s time.bora.net && /sbin/clock -w |
This file contains 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 | |
prefix="home" | |
home_root="/home/" | |
backup_root="/backup/home_backup" | |
dir_name="$(date +%y%m%d)" | |
if [ ! -d $home_root ] ; then | |
echo "please type the home path" | |
fi |
This file contains 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 | |
prefix="mysql_raw" | |
mysql_root="/var/lib/mysql" | |
backup_root="/backup/mysql_raw_backup" | |
dir_name="$(date +%y%m%d)" | |
service mysqld stop | |
service httpd stop |
This file contains 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 | |
prefix="mysql" | |
mysql_bin="/usr/bin/" | |
mysqldb_root="/var/lib/mysql/" | |
backupdb_root="/backup/mysql_sql_backup/" | |
dir_name="$(date +%y%m%d)" | |
if [ ! -d $mysqldb_root ] ; then | |
echo "please type the database path" | |
fi |
This file contains 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 | |
eval `ssh-agent` | |
keychain id_dsa | |
. /root/.keychain/localhost-sh | |
remote_dir="/backup/home_backup/latest_home_backup" | |
local_dir="/backup/home_backup" | |
dir_name="$(date +%Y%m%d)" |
This file contains 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 | |
eval `ssh-agent` | |
keychain id_dsa | |
. /root/.keychain/localhost-sh | |
remote_dir="/backup/mysql_raw_backup/latest_mysql_raw_backup" | |
local_dir="/backup/mysql_raw_backup" |
This file contains 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 | |
eval `ssh-agent` | |
keychain id_dsa | |
. /root/.keychain/localhost-sh | |
remote_dir="/backup/mysql_sql_backup" | |
local_dir="/backup/mysql_sql_backup" |
OlderNewer