Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
#
# http://php.net/download-docs.php
# http://php.net/get/php_enhanced_en.chm/from/a/mirror
curl -O http://cn2.php.net/distributions/manual/php_enhanced_en.chm
@yanxyz
yanxyz / chrome.ps1
Last active January 11, 2021 20:50
Powershell: open url in Chrome
$url = 'https://github.com/yanxyz'
try {
$chrome = (Get-ItemProperty 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe').'(Default)'
Start-Process "$chrome" $url
}
catch {
Start-Process $url
}
@yanxyz
yanxyz / 0_reuse_code.js
Last active August 29, 2015 14:24
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="author" content="http://yanxyz.net" />
<title></title>
<style>
* html .test1 .p1 {color:red;}
*+html .test1 .p2 {color:red;}
@yanxyz
yanxyz / gist:6237528
Last active December 21, 2015 02:49
递归删除.svn目录(windows) 同类脚本 http://www.cnblogs.com/xinzaitian/archive/2010/11/30/1892258.html 两者比起来哪个效率高
#!/bin/python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
import shutil
def rm_svn(path):
lst = os.listdir(path)
for item in lst: