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
find /data/dbback -type f -printf "%C@ %p\n" | sort -rn | head -n 10 |
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/env ruby | |
require "tmpdir" | |
dbpath = "/data/dbback" | |
file = `find #{dbpath} -type f -printf "%p\n" | sort -rn | head -n 1 ` | |
Dir.mktmpdir do |dir| | |
`tar -C #{dir} -zxvf #{file} ` | |
basename = File.basename(file,".gz") | |
rdir =dir+"/"+basename.gsub(".tar.gz","") | |
`mongorestore --drop --quiet #{rdir}` | |
end |
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 | |
rsync -e 'ssh -p 22' -avz [email protected]:/data/run /data/ecbackup | |
sleep 1 | |
echo "Run is backup" | |
echo "------------------------------------------------------------" | |
rsync -e 'ssh -p 22' -avz [email protected]:/etc/init/{wx,ndc,xtiku,bttrack,caddy,dljy,kpy,mongod,mongodb,qiku,tbcms,lab}.conf /data/ecbackup/upstart | |
sleep 1 | |
echo "Upstart script is backup" | |
echo "------------------------------------------------------------" |
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
require "restclient" | |
require "json" | |
#@keyword = URI::decode("新闻快讯") | |
@keyword = "学校公告" | |
start = '0' | |
lmt = '10' | |
@kword = @keyword.encode("GB2312","UTF-8") | |
kword = URI::encode(@kword) | |
lurl = "http://www.lwqzx.sdedu.net/kernel/net_school/active_app/login1.php" |
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
class AppConfig{ | |
bool is_login ; | |
String username; | |
AppConfig({this.is_login, this.username}); | |
} | |
class MyApp{ | |
static AppConfig appconfig = new AppConfig(is_login: false, username: "guest"); | |
static updateConfig(AppConfig aconfig){ | |
appconfig = aconfig; | |
} |
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
[[snippets]] | |
description = "Show all" | |
command = "ls -al " |
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
run("rm Gemfile") | |
run("touch Gemfile") | |
add_source "https://gems.ruby-china.org/" | |
gem 'rails' | |
gem 'sass-rails' | |
gem 'slim-rails' | |
#gem 'bulma-rails' | |
gem 'dalli' | |
gem 'bson' | |
gem 'rucaptcha' |
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
run("rm Gemfile") | |
run("touch Gemfile") | |
add_source "https://gems.ruby-china.org/" | |
gem 'rails' | |
gem 'sass-rails' | |
gem 'slim-rails' | |
#gem 'bulma-rails' | |
gem 'dalli' | |
gem 'bson' | |
gem 'rucaptcha' |
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
run("rm Gemfile") | |
run("touch Gemfile") | |
add_source "https://gems.ruby-china.org/" | |
gem 'rails' | |
gem 'sass-rails' | |
gem 'slim-rails' | |
#gem 'bulma-rails' | |
gem 'dalli' | |
gem 'bson' | |
gem 'rucaptcha' |
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
run("rm Gemfile") | |
run("touch Gemfile") | |
add_source "https://gems.ruby-china.org/" | |
gem 'rails' | |
gem 'sass-rails' | |
gem 'slim-rails' | |
#gem 'bulma-rails' | |
gem 'dalli' | |
gem 'bson' | |
gem 'rucaptcha' |