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 | |
# crontab -e | |
# 0 0 * * 1-5 /bin/sh /home/backup/back_all_site.sh 'daily' | |
# 1 0 * * 6 /bin/sh /home/backup/back_all_site.sh 'weekly' | |
# 2 0 1 * * /bin/sh /home/backup/back_all_site.sh 'monthly' | |
BACKUP_TIME=`date +%Y%m%d%H%M%S` | |
BACKUP_FILENAME="${BACKUP_TIME}" |
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
grep -rl "HTTP_GET_VARS" * | xargs -i sed -i "s/HTTP_GET_VARS/_GET/g" {} |
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
Show hidden characters
{ | |
"auto_close_tags": true, | |
"auto_complete": true, | |
"color_scheme": "Packages/Material Theme/schemes/Material-Theme.tmTheme", | |
"default_encoding": "UTF-8", | |
"default_line_ending": "unix", | |
"detect_indentation": false, | |
"drag_text": true, | |
"draw_white_space": "all", | |
"folder_exclude_patterns": |
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 | |
ZSH_VERSION=5.0.8 | |
yum -y install ncurses-devel | |
# download | |
wget http://sourceforge.net/projects/zsh/files/zsh/$ZSH_VERSION/zsh-$ZSH_VERSION.tar.bz2 | |
tar xvjf zsh-$ZSH_VERSION.tar.bz2 | |
cd zsh-$ZSH_VERSION | |
# compiler |
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
<?php | |
if (function_exists("date_default_timezone_set")) { | |
date_default_timezone_set("UTC"); | |
} | |
function simple() { | |
$a = 0; | |
for ($i = 0; $i < 1000000; $i++) | |
$a++; |
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
<?php | |
/* ************************************************* | |
@Name: Lifetype to Wordpress | |
@description: | |
這是一個可以直接在主機上執行的轉換程式, | |
可以協助您將Lifetype中「指定的」部落格, | |
所有文章、類別、迴響、引用、我的連結, | |
轉換到Wordpress系統「指定的」部落格中。 | |
@Version: V1.10 | |
V1.10 加入可修改base網址 |
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
# Install tmux on Centos release 6.5 up | |
# install deps | |
yum install gcc kernel-devel make ncurses-devel | |
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL | |
curl -OL https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz | |
tar -xvzf libevent-2.0.21-stable.tar.gz | |
cd libevent-2.0.21-stable | |
./configure --prefix=/usr/local |
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
# Before Tests | |
before_script: | |
- bash ci/docker_setup.sh > /dev/null | |
- composer self-update | |
- composer install --prefer-dist > /dev/null | |
- cp .env.gitlab .env | |
- php artisan key:generate | |
# Services | |
services: |
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
# Before Script | |
before_script: | |
- composer self-update | |
- composer install --prefer-dist > /dev/null | |
- cp .env.example .env | |
- php artisan key:generate | |
- php artisan migrate:refresh | |
# Services | |
services: |
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
<?php | |
namespace MyDB; | |
use Illuminate\Support\ServiceProvider; | |
use MyDB\Connectors\MyDBConnector as Connector; | |
class MyDBServiceProvider extends ServiceProvider | |
{ | |
/** |
OlderNewer