Skip to content

Instantly share code, notes, and snippets.

View phoenixg's full-sized avatar
😘
Fall in love

Phx phoenixg

😘
Fall in love
  • Shanghai, China
View GitHub Profile

The Laracasts PHPStorm theme - modified.

This is a slightly modified version of the great Laracasts PHPStorm theme. I've added some styles for Verions Control (add, modified, deleted line...) and fixed some missing things like warnings.

Download

image

Mac: Add to ~/Library/Preferences/WebIde80/colors

/**
* 微信公众平台 fakeid 爬取
* Usage: casperjs test.js 123456@qq.com password
* # phantomjs --version
* 1.9.7
* # casperjs --version
* 1.1.0-beta3
--ignore-ssl-errors=yes ???
*/
@phoenixg
phoenixg / osc.2014.aprilfool.js
Created April 1, 2014 09:53
OSC 2014年愚人节模糊页面代码
/*
* by moli
*/
$(document).ready(function(){
if(document.cookie.indexOf("lu=") == -1 ){
// 延时2秒
setTimeout("jQuery.mxblur.interID = setInterval('jQuery.mxblur.begin()', 5)", 1500);
}
});
#!/bin/bash
# tested successfully on digitalocean Ubuntu 12.40 with docker version
# after run this script, then wget youtube-dl.support1080p.sh gist, then 1080p download is working
sudo apt-get -y install vim
sudo apt-get -y install git
sudo apt-get -y install gcc
sudo apt-get -y install make
sudo apt-get -y install yasm
wget http://kakola.googlecode.com/files/lame-3.98.4.tar.gz
tar zvxf lame-3.98.4.tar.gz
FROM ubuntu
RUN sudo echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
RUN sudo apt-get update
RUN sudo apt-get install -y Dialog
RUN sudo apt-get install -y wget
RUN sudo apt-get install -y vim
RUN sudo apt-get install -y git
RUN sudo apt-get install -y gcc
RUN sudo apt-get install -y make
@phoenixg
phoenixg / noip.sh
Created February 3, 2014 16:03
树莓派设置动态DNS(使用noip服务)Raspberry Pi Beginner : Dynamic DNS
#! /bin/sh
# /etc/init.d/noip
### BEGIN INIT INFO
# Provides: noip
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Simple script to start a program at boot
@phoenixg
phoenixg / youku.address.sniffer.php
Created January 29, 2014 05:05
优酷视频地址嗅探脚本
<?php
// 引用自:http://www.oschina.net/code/snippet_616067_22723?p=2#comments
// 调用方法http://../flv.php?url=http://v.youku.com/v_show/id_XMzg2OTQ3MjQw.html
// 似乎只支持低清晰度的视频地址
echo fetch_youku_flv($_GET['url']);
function fetch_youku_flv($url){
preg_match("#id_(.*?)\.html#",$url,$out);
$id=$out[1];
$content=get_curl_contents('http://v.youku.com/player/getPlayList/VideoIDS/'.$id);
$data=json_decode($content);
#!/usr/bin/python
#-----------------------------------
# Send SMS Text Message
#
# Author : Matt Hawkins
# Site : http://www.raspberrypi-spy.co.uk/
# Date : 30/08/2012
#
# Requires account with TxtLocal
# http://www.txtlocal.co.uk/?tlrx=114032
@phoenixg
phoenixg / asplashscreen.sh
Created December 19, 2013 14:52
raspberry pi splash booting video shell script: https://dl.dropboxusercontent.com/u/106074492/asplashscreen
#! /bin/sh
### BEGIN INIT INFO
# Provides: asplashscreen
# Required-Start:
# Required-Stop:
# Should-Start:
# Default-Start: S
# Default-Stop:
# Short-Description: Show custom splashscreen
# Description: Show custom splashscreen