Skip to content

Instantly share code, notes, and snippets.

View hileon's full-sized avatar

Leon Zhang hileon

View GitHub Profile
@hileon
hileon / gist:e37aa1d23789cc512ea32f0a2e04d2e3
Created December 18, 2018 08:26 — forked from mvasilenko/gist:b8c47616fa74de63dcc030508c53e7c1
goaccess nginx apm log format template
time-format %T
date-format %d/%b/%Y
log_format "%d:%t +%^" client=%h method=%m request="%r" request_length=%^ status=%s bytes_sent=%b body_bytes_sent=%^ referer=%R user_agent="%^" upstream_addr=%^ upstream_status=%^ request_time=%T upstream_response_time=%^ upstream_connect_time=%^ upstream_header_time=%^
@hileon
hileon / os-x-for-hackers
Created March 30, 2016 08:33 — forked from krry/os-x-for-hackers
OSX for Hackers mods
# to run this script in one step, copy/paste/execute the following:
# bash <(curl -s https://gist.githubusercontent.com/krry/9263570/raw/878797c4e54f9de71137699544567c6bd2d4f6c4/os-x-for-hackers)
#!/usr/bin/env bash
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Ask for the administrator password upfront
sudo -v
@hileon
hileon / btn_less
Created April 19, 2012 08:07
standalone_btn_of_twitter_bootstrap
//Stant alone button less file. Extracted from twitter's bootstrap
//Start bootstrap button
// Grays
// -------------------------
@black: #000;
@grayDarker: #222;
@grayDark: #333;
@gray: #555;
@hileon
hileon / gist:2212834
Created March 27, 2012 05:33 — forked from palimadra/gist_template
ZenCoding Cheatsheet

syntax

  • ID and CLASS attributes: div*page.section.main.
  • Custom attributes: div[title], a[title="Hello world" rel], td[colspan=2].
  • Element multiplication: li*5 will output <li> tag five times.
  • Item numbering with $ character: li.item$*3 will output <li> tag three times, replacing $ character with item number.
  • Multiple $ characters in a row are used as '''zero padding''', i.e.: li.item$$$li.item001
  • Abbreviation groups with unlimited nesting: div*page>(div*header>ul*nav>li*4>a)+(div*page>(h1>span)+p*2)+div*footer. You can literally write a full document markup with just a single line. *Filters support div tag name can be omitted when writing element starting from ID or CLASS: *content>.section is the same as div*content>div.section.
  • (v0.7) Text support: p>{Click }+a{here}+{ to continue}.
@hileon
hileon / cheatsheet.atom
Created March 27, 2012 04:13 — forked from japboy/cheatsheet.atom
My Web document cheatsheets
<?xml version="1.0" encoding="utf-8"?>
<feed
xmlns="http://www.w3.org/2005/Atom"
xml:lang="ja-JP">
<author>
<name>Japboy</name>
</author>
<category/>
<contributor/>
@hileon
hileon / git-cheatsheet.mkd
Created March 27, 2012 04:13 — forked from javifr/git-cheatsheet.mkd
git cheatsheet

GIT CHEATSHEET

De una máquina a otra en la misma red

( siendo xxxx ip de la máquina y YYYYYY carpeta del repo )
CLONE
git clone -u /usr/local/git/bin/git-upload-pack ssh://XXXXXXX/users/javier/Sites/YYYYYYYYY

PULL
git pull --upload-pack /usr/local/git/bin/git-upload-pack ssh://XXXXXXX/users/javier/Sites/YYYYYYYYY

@hileon
hileon / rvm_cheatsheet
Created March 27, 2012 04:12 — forked from fajrif/rvm_cheatsheet
RVM cheatsheet
RVM home page: http://rvm.beginrescueend.com
Install RVM
------------
See http://rvm.beginrescueend.com/rvm/install/
bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
Install rvm for all users
@hileon
hileon / cheatsheet.md
Created March 27, 2012 04:12 — forked from jessedearing/vim cheatsheet.md
Vim Cheatsheet

#Vim Cheat Sheet

  • gqip - Reformats paragraph to textwidth
  • gq - Reformats selection
  • :Tab /= - Equally spaces based on the = symbol (requires Tabular vim plugin)
  • :setf language - Changes current language
  • :set language=language - Changes current language
  • <C-a> - Increments the number under the cursor
  • <C-x> - Decrements the number under the cursor
@hileon
hileon / gist:2212463
Created March 27, 2012 04:11
Markdown Syntax Cheatsheet

Syntax Cheatsheet:

Phrase Emphasis

*italic*   **bold**
_italic_   __bold__

Links

@hileon
hileon / Markdown Syntax
Created March 27, 2012 04:11 — forked from shanewfx/Markdown Syntax
Markdown Syntax
Markdown Syntax:
1.Phrase Emphasis 斜体与加粗
*italic* **bold**
_italic_ __bold__
2.Links 超链接