Skip to content

Instantly share code, notes, and snippets.

View krwu's full-sized avatar

Kairee Wu krwu

View GitHub Profile
@krwu
krwu / online.html
Created July 25, 2017 09:23
Online servers.
<!DOCTYPE html>
<html lang="zh-Hans-CN">
<head>
<meta charset="UTF-8">
<title>Online Monitor</title>
<link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
<style>
td {
vertical-align: middle !important;
}
@krwu
krwu / LaravelPackages.md
Last active January 3, 2017 06:18
Laravel Packages for New Project
  1. barryvdh/laravel-ide-helper
    • install: composer require barryvdh/laravel-debugbar
    • provider: Barryvdh\Debugbar\ServiceProvider::class,
    • facade: 'Debugbar' => Barryvdh\Debugbar\Facade::class,
    • config: php artisan vendor:publish --provider="Barryvdh\Debugbar\ServiceProvider"
  2. barryvdh/laravel-debugbar
    • install: composer require --dev barryvdh/laravel-ide-helper
    • provider: in app/Providers/AppServiceProvider.php
        public function register()
@krwu
krwu / .screenrc
Created May 24, 2014 05:00
.screenrc for enable mouse / touchpad scrolling.
defscrollback 5000
termcapinfo xterm* ti@:te@
#!/bin/bash
# install homebrew's official php tap
brew tap josegonzalez/homebrew-php
# install homebrew-dupes (required to install zlib, php54's dependency)
brew tap homebrew/dupes
# install nginx + mysql + php 5.4 + php-fpm + apc + xdebug
brew install nginx mysql
@krwu
krwu / ngx-vhost.conf
Last active August 29, 2015 14:01
Nginx virtual host demo.
server {
listen 80;
server_name {$host}.{$domain};
index index.html;
root /data/www/{$domain}/{$host};
location / {
try_files $uri $uri/ /index.php?$query_string;
}
body {
font-family: Helvetica, arial, sans-serif;
font-size: 14px;
line-height: 1.6;
padding-top: 10px;
padding-bottom: 10px;
background-color: white;
padding: 30px; }
body > *:first-child {
@krwu
krwu / adp_allowed_filter.txt
Created February 27, 2013 03:28
Adblock Plus Rules for allowed domains.
[Adblock Plus 2.0]
! Title: AllowedFilter
! Last modified: 26 Feb 2013 12:20 UTC
! Expires: 5 days (update frequency)
! Homepage: https://easylist.adblockplus.org/
! Licence: https://easylist-downloads.adblockplus.org/COPYING
!
! Please report any unblocked adverts or problems
! in the forums (http://forums.lanik.us/)
! or via e-mail ([email protected]).
@krwu
krwu / index.html
Created August 21, 2012 15:56
Walk through a dom tree witch has three level structures. for level one lists, add one star to each item; for level two, add two, and three for level three, etc.
<ul id="root">
<li>
<span class="h2">一级标题</span>
<ul>
<li>
<span class="h3">二级标题</span>
</li>
<li>
<span class="h3">二级标题</span>
</li>
@krwu
krwu / addstars.html
Created August 21, 2012 10:21
Nodes Traversal
<!DOCTYPE HTML>
<html lang="zh">
<head>
<meta charset="UTF-8">
<title>DEMO</title>
<style>
body,ul,ol {margin:0;font-weight:normal;line-height:1.5;}
.h2 {font-size:160%;}
.h3 {font-size:120%;}
.h4 {font-size:100%;}