Skip to content

Instantly share code, notes, and snippets.

View xonge's full-sized avatar

陆小凤 xonge

  • 长沙微动信息
  • 长沙
View GitHub Profile
@xonge
xonge / ngrok-selfhosting-setup.md
Created June 29, 2016 02:03 — forked from lyoshenka/ngrok-selfhosting-setup.md
How to setup Ngrok with a self-signed SSL cert

Intro

The plan is to create a pair of executables (ngrok and ngrokd) that are connected with a self-signed SSL cert. Since the client and server executables are paired, you won't be able to use any other ngrok to connect to this ngrokd, and vice versa.

DNS

Add two DNS records: one for the base domain and one for the wildcard domain. For example, if your base domain is domain.com, you'll need a record for that and for *.domain.com.

Different Operating Systems

@xonge
xonge / CodeigniterValetDriver.php
Created June 20, 2016 09:22 — forked from viirre/CodeigniterValetDriver.php
Valet driver for the Codeigniter framework
<?php
class CodeigniterValetDriver extends ValetDriver
{
/**
* Determine if the driver serves the request.
*
* @param string $sitePath
* @param string $siteName
* @param string $uri
@xonge
xonge / html5boilerplate.jade
Created June 15, 2016 12:52 — forked from xtian/html5boilerplate.jade
HTML5 Boilerplate in jade
!!! 5
html(class='no-js')
head
meta(charset='utf-8')
meta(http-equiv='X-UA-Compatible', content='IE=edge')
title
meta(name='description', content='')
meta(name='viewport', content='width=device-width, initial-scale=1')
@xonge
xonge / iterm2-solarized.md
Created June 1, 2016 03:03 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + oh my zsh + solarized + Meslo powerline font (OSX)

Solarized

@xonge
xonge / phpstorm
Created April 12, 2016 02:49 — forked from luxixing/phpstorm
PHPStorm 使用技巧
快捷键:
ctrl+tab: switcher,在已打开文件之间或者工具窗口间切换
alt+alt: 连续两次快速按下alt键不放,显示tool windows(project,database ...)
ctrl+k: 快速调用 commit changes 对话框
alt+F3: 显示搜索窗格,对当前文件进行搜索,然后配合ctrl+alt+r,可以进行替换操作
ctrl+shift+f: find in path 在指定文件夹或者整个project内搜索,ctrl+shift+r进行替换操作
ctrl+shift+alt+t: 快速rename,里面有好几个选项,慢慢理解吧
shift+F6: rename,自动重命名该变量所有被调用的地方
ctrl+shift+n: 快速导航到指定文件,弹出一个dialog,输入文件名即可
@xonge
xonge / PhpStorm Keymap
Created April 7, 2016 13:01 — forked from niweea/PhpStorm Keymap
PhpStorm快捷键
### Editing ###
`Ctrl + Space` 基本代码完成(任意类的,方法的或者变量的名称)
`Ctrl + Shift + Enter` 补全当前语句
`Ctrl + P` Parameter info (within method call arguments)
`Ctrl + Q` 快速查找文档
`Ctrl + 鼠标滑过` 简明信息查看
`Ctrl + F1` 在插入符号处显示错误或者警告信息
`Alt + Insert` 生成代码...(Getters,Setters,Constructors)
`Ctrl + O` 重写方法
`Ctrl + I` 实现方法
@xonge
xonge / CustomRules.js
Created September 30, 2015 06:26 — forked from kitemao/CustomRules.js
使用fiddler构建动态数据桩------用fiddler按目录 自动下载保存 浏览器请求的文件.
import System;
import System.Windows.Forms;
import Fiddler;
// INTRODUCTION
// This is the FiddlerScript Rules file, which creates some of the menu commands and
// other features of Fiddler. You can edit this file to modify or add new commands.
//
// The original version of this file is named SampleRules.js and it is in the
// \Program Files\Fiddler\ folder. When Fiddler first starts, it creates a copy named
@xonge
xonge / remotefileexists.demo.2.php
Created June 19, 2015 07:31
php判断url链接是不是音乐文件
/**
* 判断链接是不是音乐文件
* @param string $url 链接地址
* @return bool 是就返回true,不是就返回false
*/
function url_is_audio($url = 'http://') {
$url_arr = parse_url($url);
$host = $url_arr['host'];
$path = $url_arr['path'];
echo $host . $path;
@xonge
xonge / nochinese.php
Created June 17, 2015 12:01
php使用正则去掉字符串中的中文
<?php
$a = "<tt>som在线冲值e</tt><b>ht打算ml</b>";
$result = preg_replace('/([\x80-\xff]*)/i', '', $a);
var_dump($result);
?>
@xonge
xonge / xgwx.js
Created June 9, 2015 09:19
js正则匹配出数字
var _versionstr = useragent.match(/MicroMessenger\/(.*?)[^\d\.]/i);