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
| var YYF_CONSOLE = { | |
| _console: function(method) { | |
| return function() { | |
| setTimeout(console[method].bind.apply(console[method], [console].concat(Array.prototype.slice.call(arguments)))); | |
| } | |
| } | |
| }; | |
| ['assert','clear','count','debug','dir','dirxml','error','group','groupCollapsed','groupEnd','info','log','profile','profileEnd','time','timeEnd','timeStamp','warn'].forEach(function(method) { | |
| YYF_CONSOLE[method] = YYF_CONSOLE._console(method); |
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 bash | |
| # 模拟单个mapper和reducer | |
| SORT='-k1,1' | |
| if [ $# -lt 2 ] ; then | |
| echo "USAGE:" | |
| echo " $0 inputfile mapper"; #双参数 | |
| echo " $0 inputfile mapper reducer ";#三参数 | |
| echo " $0 inputfile mapper reducer SORT_ARGS";#多参数 | |
| echo " -default [SORT_ARGS]: '$SORT'"; |
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/bash | |
| MAXIMUM_BACKUP_FILES=10 #最大备份文件数 | |
| BACKUP_FOLDERNAME="/var/db/backup/" #数据库备份文件的主目录 | |
| DB_HOSTNAME="localhost" #mysql所在主机的主机名 | |
| DB_USERNAME="backupaccount" #mysql登录用户名 | |
| DB_PASSWORD="backuppassword" #mysql登录密码 | |
| DATABASES=( | |
| "dbname" #备份的数据库名 | |
| ) |
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
| Windows Registry Editor Version 5.00 | |
| [HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\Github] | |
| "Colour0"="62,62,62" | |
| "Colour1"="201,85,0" | |
| "Colour2"="244,244,244" | |
| "Colour3"="244,244,244" | |
| "Colour4"="63,63,63" | |
| "Colour5"="62,62,62" | |
| "Colour6"="62,62,62" |
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/bash | |
| set -e | |
| ### BEGIN INIT INFO | |
| # Provides: sslocal | |
| # Required-Start: $syslog $remote_fs | |
| # Required-Stop: $syslog $remote_fs | |
| # Should-Start: | |
| # Should-Stop: | |
| # Default-Start: 2 3 4 5 |
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
| alias YAF='docker run -it --rm -p8080:80 -v"$(pwd)":/newfuture/yaf newfuture/yaf' |
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
| #删除文件和历史记录 | |
| git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch {path-of-remove-file}' --prune-empty --tag-name-filter cat -- --all | |
| #删除远程分支 | |
| git push origin --delete {branchname} | |
| git push origin --delete tag {tag name} |
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 python3 | |
| import collections | |
| def get_isosceles_trapezoid_num(edges): | |
| d={} | |
| sorted(edges) | |
| for edge in edges: | |
| d[edge] = d.get(edge,0) + 1 | |
| #字典排序 |
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
| declare global { | |
| interface Date { | |
| format(fmt: string): string; | |
| isToday(): boolean; | |
| } | |
| } | |
| let week = ["一", "二", "三", "四", "五", "六", "日"]; | |
| let week_pre = ["", "周", "星期"]; | |
| Date.prototype.format = function (fmt: string): string { | |
| var o = { |
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
| rm -rf /data/data/com.chaozhuo.texteditor.phoenixos | |
| rm -rf /data/data/com.chaozhuo.filemanager.phoenixos | |
| rm -rf /data/data/com.chaozhuo.browser.x86 | |
| rm -rf /data/data/com.tencent.tmgp.pubgmhd/files/tss_tmp | |
| echo "O98K" |