Skip to content

Instantly share code, notes, and snippets.

Leon Zhang hileon

Block or report user

Report or block hileon

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:e37aa1d23789cc512ea32f0a2e04d2e3
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 Mar 30, 2016 — forked from krry/os-x-for-hackers
OSX for Hackers mods
View os-x-for-hackers
# 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 Apr 19, 2012
standalone_btn_of_twitter_bootstrap
View btn_less
//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 Mar 27, 2012 — forked from palimadra/gist_template
ZenCoding Cheatsheet
View gist:2212834

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 Mar 27, 2012 — forked from japboy/cheatsheet.atom
My Web document cheatsheets
View cheatsheet.atom
<?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/>
View git-cheatsheet.mkd

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 Mar 27, 2012 — forked from fajrif/rvm_cheatsheet
RVM cheatsheet
View 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
View cheatsheet.md

#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 Mar 27, 2012
Markdown Syntax Cheatsheet
View gist:2212463

Syntax Cheatsheet:

Phrase Emphasis

*italic*   **bold**
_italic_   __bold__

Links

View Markdown Syntax
Markdown Syntax:
1.Phrase Emphasis 斜体与加粗
*italic* **bold**
_italic_ __bold__
2.Links 超链接
You can’t perform that action at this time.