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
###################### | |
## shadowsocks-libev | |
###################### | |
# install dependencies | |
yum install epel-release -y | |
yum install gcc gettext autoconf libtool automake make pcre-devel asciidoc xmlto udns-devel libev-devel -y | |
# install shadowsocks-libev | |
cd /etc/yum.repos.d/ |
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
module CheckDigit | |
class SEDOL | |
SEDOL_WEIGHTS = [1,3,1,7,3,9] | |
SEDOL_PATTERN = /[B-Db-dF-Hf-hJ-Nj-nP-Tp-tV-Xv-xYyZz\d]{6}/ # http://regexlib.com/REDetails.aspx?regexp_id=1044 | |
def self.calculate(sedol) | |
raise 'Invalid pattern' unless sedol =~ SEDOL_PATTERN |
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
This can be used in Mac by using following trick: | |
Open trial.key at path: /Applications/Beyond\ Compare.app/Contents/Resources/trial.key | |
Replace content of trial.key with: | |
--- BEGIN LICENSE KEY --- | |
H1bJTd2SauPv5Garuaq0Ig43uqq5NJOEw94wxdZTpU-pFB9GmyPk677gJ | |
vC1Ro6sbAvKR4pVwtxdCfuoZDb6hJ5bVQKqlfihJfSYZt-xVrVU27+0Ja | |
hFbqTmYskatMTgPyjvv99CF2Te8ec+Ys2SPxyZAF0YwOCNOWmsyqN5y9t | |
q2Kw2pjoiDs5gIH-uw5U49JzOB6otS7kThBJE-H9A76u4uUvR8DKb+VcB | |
rWu5qSJGEnbsXNfJdq5L2D8QgRdV-sXHp2A-7j1X2n4WIISvU1V9koIyS |
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
$date = Get-Date -UFormat %Y-%m-%d; | |
$backupFolder = $date; | |
$basePath = "C:\bla"; | |
$destinationPath = Join-Path $basePath $backupFolder; | |
if(!(Test-Path -Path $destinationPath)) { | |
New-Item -ItemType directory -Path $destinationPath; | |
(C:\mongodb\bin\mongodump.exe --out $destinationPath); | |
} |
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
$server = "IE11WIN7\SQLEXPRESS" | |
$tablequery = "SELECT name from sys.tables" | |
$databases = @( | |
"AdjudicationPanel", | |
"Ossc", | |
"Osscahmlr", | |
"ASADJ", | |
"CARESTANDARDS", | |
"CICAP", |
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
git config --global http.proxy 'socks5://127.0.0.1:1080' | |
git config --global https.proxy 'socks5://127.0.0.1:1080' |
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
// 方法一:string | |
function multiChar(str) { | |
if (typeof str !== 'string') { | |
return ''; | |
} | |
var obj = {}, | |
num = 0, | |
value = '', | |
ch = ''; |
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
import urllib.request | |
import re | |
import datetime | |
from datetime import timedelta | |
import ctypes | |
import winsound | |
def search(fromDate,toDate): | |
found = False | |
while not found: |