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 | |
#================================== | |
# AUTHOR: printempw | |
# NOTE: I HAVEN'T WRITE ANY DEBUG CODE IN THIS SHELL, | |
# IF ANY ERROR RAISES,UMM,JUST LET IT GO | |
# SYSTEM REQUIRED: ONLY FOR UBUNTU | |
#================================== | |
clear | |
echo "" |
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
#!/usr/bin/env python | |
# -*- coding=utf-8 -*- | |
import sys | |
# Python version check | |
if (sys.version_info[0] < 3): | |
print("This script only works on Python 3+.") | |
exit(1) | |
import os, time | |
import urllib.request |
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
#!/usr/bin/env python | |
# -*- coding=utf-8 -*- | |
art_dict = {} | |
def getArtLines(ascii): | |
lineNumberStart = (ascii - 64 - 1)*3 + 1 | |
result = [] | |
lines = ['┌─┐', '├─┤', '┴ ┴', '┬┐ ', '├┴┐', '┴─┘', '┌─┐', '│ ', '└─┘', '┬─┐', '│ │', '┴─┘', '┌─┐', '├┤ ', '└─┘', '┬─┐', '├┤ ', '┴ ', '┌─┐', '│ ┐', '└─┘', '┬ ┬', '├─┤', '┴ ┴', ' ┬ ', ' │ ', ' ┴ ', ' ┬ ', ' │ ', '└┘ ', '┐┌ ', '├┴┐', '┴ ┴', '┬ ', '│ ', '┴─┘', '┌┬┐', '│││', '┴ ┴', '┌┐┌', '│││', '┘└┘', '┌─┐', '│ │', '└─┘', '┬─┐', '├─┘', '┴ ', '┌─┐', '│ │', '└─┴', '┬─┐', '├┬┘', '┴└─', '┌─┐', '└─┐', '└─┘', '┌┬┐', ' │ ', ' ┴ ', '┐ ┌', '│ │', '└─┘', '┐ ┌', '└┐│', ' └┘', '┬ ┬', '│││', '└┴┘', '┬ ┬', '└┬┘', '┴ ┴', '┬ ┬', '└─┤', '└─┘', '┌─┐', '┌─┘', '└─┘'] | |
for i in range(3): |
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 | |
/* MySQL 数据库名称 */ | |
define('DB_NAME', 'wordpress'); | |
/* MySQL 数据库用户名 */ | |
define('DB_USER', 'root'); | |
/* MySQL 数据库密码 */ | |
define('DB_PASSWD', 'root'); |
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
/** | |
* Add to $(document).ready() | |
* Will auto load page view for each post on the page | |
*/ | |
$('[id=post-view]').each(function(){ | |
url = 'http://127.0.0.1/count.php?action=get&slug='+$(this).attr('data').slice(1,-1); | |
var span = $(this); | |
$.getJSON(url, function(data) { | |
span.html(data.count); | |
}); |
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 | |
/** | |
* @Author: printempw | |
* @Date: 2016-02-01 20:37:43 | |
* @Last Modified by: prpr | |
* @Last Modified time: 2016-02-01 22:10:06 | |
* | |
* Configure your database connection info here. | |
* $wp_conn for WordPress installation database, | |
* $ghost_conn for which you place `post_views` table in. |
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 | |
/** | |
* @Author: printempw | |
* @Date: 2016-01-31 17:08:29 | |
* @Last Modified by: prpr | |
* @Last Modified time: 2016-02-02 16:31:55 | |
* | |
* Database type, `mysql` or `sqlite` | |
*/ | |
define('DB_TYPE', 'mysql'); |
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 | |
function __autoload($classname) { | |
$dir = dirname(__FILE__); | |
$include_dir = $dir.DIRECTORY_SEPARATOR."includes".DIRECTORY_SEPARATOR."classes".DIRECTORY_SEPARATOR; | |
$filename = $include_dir.str_replace('\\', DIRECTORY_SEPARATOR, $classname) . '.class.php'; | |
require_once($filename); | |
} |
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 local shell, prompt is lik this | |
# ➜ blessing-skin-server git:(master)$ | |
local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ %s)" | |
PROMPT='${ret_status}%{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%}%{$reset_color%}%{$fg_bold[blue]%}$ %{$reset_color%}' | |
ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗ %{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})" |
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
#kaomoji { | |
-moz-user-select: none; | |
-webkit-user-select: none; | |
-ms-user-select: none; | |
} | |
.info-rise { | |
z-index: 99999; | |
position: absolute; | |
padding: 0 4px; | |
border-radius: 1px; |
OlderNewer