Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| #!/usr/bin/env python | |
| # -*- coding:utf-8 -*- | |
| """ | |
| Describe: 自动更新host文件,用xpath处理网页内容 | |
| Anthor: Aeesky | |
| Version: 0.0.1 | |
| Date: 2014-12-04 | |
| Languag: Python2.7.8 | |
| Editor: Sublime Text3 |
| @echo off | |
| for /f "delims=" %%a in ('dir /b/s/a-d *.bak') do ( | |
| cd /d "D:\Program Files\WinRAR" | |
| echo archiving ... time /t | |
| winrar A -ep -ibak -df %%a.rar %%a | |
| ) | |
| pause | |
| import subprocess | |
| from ConfigParser import SafeConfigParser | |
| from StringIO import StringIO | |
| def GetPorts(filename): | |
| f = file(filename); | |
| scp2 = SafeConfigParser() | |
| f.seek(0) | |
| scp2.readfp(f) | |
| sections = scp2.sections() |
| import os | |
| for root, dirs, files in os.walk('E:\CodeZone', topdown=False): | |
| for name in files: | |
| if name =='svn-git.log': | |
| log = os.path.join(root, name) | |
| print 'deleted ',log | |
| os.remove(log) | |
| # for name in dirs: | |
| # os.rmdir(os.path.join(root, name)) |
| import os | |
| import subprocess | |
| # git remote -v | |
| def giturl(dir): | |
| os.chdir(dir) | |
| cmd = "git remote -v" | |
| p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) | |
| url = p.stdout.readlines()[0].split(' ')[0] | |
| return str(url).rstrip() |
| public Encoding GetEncoding(string CharacterSet) | |
| { | |
| switch (CharacterSet) | |
| { | |
| case "gb2312": return Encoding.GetEncoding("gb2312"); | |
| case "utf-8": return Encoding.UTF8; | |
| default: return Encoding.Default; | |
| } | |
| } |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| @ECHO OFF | |
| cd %~dp1 | |
| ECHO Compiling %~nx1....... | |
| IF EXIST %~n1.exe ( | |
| DEL %~n1.exe | |
| ) | |
| csc %~nx1 | |
| IF EXIST %~n1.exe ( | |
| ECHO -----------OUTPUT----------- | |
| start %~n1 |
| using System; | |
| class test | |
| { | |
| public static void Main(string[] args) | |
| { | |
| Console.WriteLine("test"); | |
| } | |
| } |
| { | |
| "cmd": ["RunCSharp.bat", "$file"], | |
| "file_regex": "^(...*?):([0-9]*):?([0-9]*)", | |
| "selector": "source.cs", | |
| "encoding": "cp936" | |
| } |