Skip to content

Instantly share code, notes, and snippets.

import 'package:flutter/material.dart';
import 'package:gistaff/page/song_list.dart';
class StartPage extends StatefulWidget {
final List<PageConfig> pages;
const StartPage({Key? key, required this.pages}) : super(key: key);
@override
_StartPageState createState() => _StartPageState();
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Ryan4CN
Ryan4CN / timezone.test.php
Last active July 18, 2017 15:55
php timezone
<?php
/**
* install timezonedb
*
* 1. apt-get install php7.0-dev
* 2. pecl install timezonedb
* 3. You should add "extension=timezonedb.so" to php.ini
*
*/
@Ryan4CN
Ryan4CN / jenkins:01-project:config.xml
Last active September 14, 2016 07:30
php-jenkins 的配置,有两个自动构建配置,一个是项目本身构建,另外一个是 发送 merge request 到 coding 的脚本,配置地址在 ~/.jenkins/jobs 的你要指定项目里面
<?xml version='1.0' encoding='UTF-8'?>
<project>
<actions/>
<description></description>
<keepDependencies>false</keepDependencies>
<properties/>
<scm class="hudson.plugins.git.GitSCM" plugin="git@3.0.0">
<configVersion>2</configVersion>
<userRemoteConfigs>
<hudson.plugins.git.UserRemoteConfig>
@Ryan4CN
Ryan4CN / dbbackup.sh
Last active April 6, 2023 17:26
[Mysql 备份脚本] 用于备份数据库 如果是使用 Percona Server 发行版可以使用一个开源软件 surrogate
#!/bin/bash
#Shell Command For Backup MySQL Database Everyday Automatically By Crontab
USER=root
PASSWORD="password"
HOSTNAME="10.70.49.47"
KEEPDATE="15"
BACKUP_DIR=/root/dbbackup/db/ #备份文件存储路径
LOGFILE=${BACKUP_DIR}test.log #日记文件路径
@Ryan4CN
Ryan4CN / import.sh
Last active July 25, 2016 06:42
进入逐个目录进行包压缩脚本 和 批量导入 couchbase 脚本
#!/bin/bash
for file in *
do
if test -f $file
then
/opt/couchbase/bin/cbdocloader -u admin -p 123456 -n 127.0.0.1:8091 -b G
center -s 1000 $file
rm -rf $file
fi
done
location ~* ^/api/base {
default_type 'application/json';
content_by_lua_file lua/api_base.lua;
break;
}
location /real/api/base {
proxy_pass http://127.0.0.1:81/api/base;
}
@Ryan4CN
Ryan4CN / api.lua
Last active October 2, 2015 18:04
-- nginx lua 模块缓存
cjson = require "cjson"
redis = require "resty.redis"
if ngx.req.get_headers()['PARAMS'] == nil then
ngx.say('params error')
return
end
@Ryan4CN
Ryan4CN / ngx-lua.sh
Last active May 31, 2019 23:16 — forked from hit9/ngx-lua.sh
[编译Nginx使之支持Lua脚本]Script to compile nginx on ubuntu with lua support.
#!/bin/sh
apt-get install -y libreadline-dev libncurses5-dev libpcre3-dev \
libssl-dev perl make build-essential
# Script to compile nginx on ubuntu with lua support.
NGX_VERSION='1.8.0'
LUAJIT_VERSION='2.0.4'
LUAJIT_MAJOR_VERSION='2.0'