# yum repository
$ vim /etc/yum.repos.d/nginx.repo
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/7/$basearch/
gpgcheck=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
#!/bin/bash | |
cd /tmp | |
apt-get update | |
apt install -y libtool pkg-config build-essential autoconf automake uuid-dev git wget | |
git clone git://github.com/jedisct1/libsodium.git | |
cd libsodium/ | |
./autogen.sh | |
./configure && make check | |
make install | |
ldconfig |
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
// REMOVE WP.COM CALL FOR JETPACK | |
// STUPID WORDPRESS JETPACK USAGE STATS... | |
add_action('wp_enqueue_scripts', create_function(null, "wp_dequeue_script('devicepx');"), 20); | |
add_action('admin_enqueue_scripts', create_function(null, "wp_dequeue_script('devicepx');"), 20); | |
// REMOVE SHARE COUNTS FROM JETPACK | |
// THESE CALL api.facebook.com AND api.twitter.com | |
// SHARE BUTTONS ARE STILL THERE, JUST NO COUNTS. NBD. | |
add_filter( 'jetpack_sharing_counts', '__return_false' ); |
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 product is already in global space | |
global $product; | |
// or fetch product attributes by ID | |
if( empty( $product->id ) ){ | |
$wc_pf = new WC_Product_Factory(); | |
$product = $wc_pf->get_product($id); | |
} |
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
# IMPORTANT: SET A SECRET PASSWORD in Postgres for the Discourse User | |
# TODO: change SOME_SECRET in this template | |
templates: | |
- "templates/sshd.template.yml" | |
- "templates/web.template.yml" | |
- "templates/web.ratelimited.template.yml" | |
expose: | |
- "80:80" |
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
for i in {1..12} | |
do | |
url=http://www.bilibili.com/video/av3794937/index_$i.html | |
echo $url | |
youtube-dl -o "SeGmEnT-$i-%(playlist_index)s.%(ext)s" $url | |
rm -f buffer_list | |
touch buffer_list | |
for file in $(ls SeGmEnT-$i-*.flv) | |
do | |
echo file "'$file'" >> buffer_list |
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 | |
/** | |
* Plugin Name: DoxyGen Integration | |
* Plugin URI: http://www.fivetalent.com/ | |
* Description: Enables shortcodes to embed a doxygen site into a page | |
* Version: 1.0 | |
* Author: Eric Freed / Five Talent | |
*/ | |
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
# device_id, sid, uid 需要自己先抓包获取到 | |
# game_mode 1是无尽模式 2是限时模式 | |
import hashlib | |
import hmac | |
import base64 | |
import requests | |
def data_to_string(data): |
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
#!python3 | |
import itchat | |
# tuling plugin can be get here: | |
# https://github.com/littlecodersh/EasierLife/tree/master/Plugins/Tuling | |
from tuling import get_response | |
@itchat.msg_register('Text') | |
def text_reply(msg): | |
if '作者' in msg['Text'] or '主人' in msg['Text']: | |
return '你可以在这里了解他:https://github.com/littlecodersh' |
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
{ | |
"不败战神": { | |
"url": "http://www.23us.com/html/27/27736/", | |
"bookmark": "第两百八十八节 唐天的判断" | |
}, | |
"大主宰": { | |
"url": "http://www.23us.com/html/28/28373/", | |
"bookmark": "第一百九十五章 取巧" | |
}, | |
"神级英雄": { |
OlderNewer