Skip to content

Instantly share code, notes, and snippets.

<?php die('This file is not really here!');
/**
* ------------- DO NOT UPLOAD THIS FILE TO LIVE SERVER ---------------------
*
* Implements code completion for CodeIgniter in phpStorm
* phpStorm indexes all class constructs, so if this file is in the project it will be loaded.
* -------------------------------------------------------------------
* Drop the following file into a CI project in phpStorm
* You can put it in the project root and phpStorm will load it.
@tomoat
tomoat / centos6.5_nginx
Created June 22, 2016 02:37 — forked from ifels/centos6.5_nginx
centos 6.5 nginx安装与配置
第一步,在/etc/yum.repos.d/目录下创建一个源配置文件nginx.repo:
cd /etc/yum.repos.d/
vim nginx.repo
填写如下内容:
[nginx]
name=nginx repo
@tomoat
tomoat / 0_reuse_code.js
Created November 1, 2016 17:11
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
@tomoat
tomoat / make.sh
Created November 17, 2016 03:59 — forked from artzub/make.sh
Install JetBrains Hub + YouTrack + UpSource + Nginx
#!/bin/bash
apt-get install mc htop git unzip wget curl -y
echo
echo "====================================================="
echo " WELCOME"
echo "====================================================="
echo
echo "Hub"
@tomoat
tomoat / .eslintrc.yaml
Created December 8, 2016 02:30 — forked from wegry/.eslintrc.yaml
eslint 3.3 yaml config
---
env:
browser: true
es6: true
parserOptions:
ecmaVersion: 6
sourceType: module
rules:
@tomoat
tomoat / .eslintrc.yaml
Created December 8, 2016 02:32 — forked from wegry/.eslintrc.yaml
Lightweight eslint config in yaml
---
env:
browser: true
parserOptions:
ecmaVersion: 6
sourceType:
module
ecmaFeatures:
jsx: true
#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten
@tomoat
tomoat / npm.taobao.sh
Created March 20, 2017 14:34 — forked from 52cik/npm.taobao.sh
npm 淘宝镜像配置
npm set registry https://registry.npm.taobao.org # 注册模块镜像
npm set disturl https://npm.taobao.org/dist # node-gyp 编译依赖的 node 源码镜像
## 以下选择添加
npm set chromedriver_cdnurl http://cdn.npm.taobao.org/dist/chromedriver # chromedriver 二进制包镜像
npm set operadriver_cdnurl http://cdn.npm.taobao.org/dist/operadriver # operadriver 二进制包镜像
npm set phantomjs_cdnurl http://cdn.npm.taobao.org/dist/phantomjs # phantomjs 二进制包镜像
npm set sass_binary_site http://cdn.npm.taobao.org/dist/node-sass # node-sass 二进制包镜像
npm set electron_mirror http://cdn.npm.taobao.org/dist/electron/ # electron 二进制包镜像
@tomoat
tomoat / httpHelper.js
Created April 10, 2017 12:15 — forked from dontcry2013/httpHelper.js
node.js http tool to handle GBK encoding
/**
* @fileOverview http请求的工具操作集,包含请求超时时间设置
* @module tool/httpHelper
*/
var http = require('http');
var https = require('https');
var qs = require('querystring');
var iconv = require('iconv-lite');
var BufferHelper = require('bufferhelper');
@tomoat
tomoat / iconv.js
Created April 13, 2017 08:48 — forked from wuqian/iconv.js
Nodejs抓取非utf8字符编码的页面
var http = require('http');
var options = {
host: 'www.baidu.com',
port: 80,
path: '/s?wd=gfw'
};
var Iconv = require('iconv').Iconv;