Skip to content

Instantly share code, notes, and snippets.

View wcc526's full-sized avatar

chi-chi weng wcc526

View GitHub Profile
@wcc526
wcc526 / blsql.py
Last active April 7, 2023 15:30
Blind SQL injection Python shell
#!/usr/bin/env python
'''
Blind SQL injection Python shell
BSIShell is a simple python script that permits blind SQL injection.
by Rodrigo Marcos
'''
@wcc526
wcc526 / xss-ie.md
Created September 26, 2015 06:44
xss-ie

IE

<img ... title=""onerror="alert(1)">
<img ... title=``onerror=`alert(1)`>
@wcc526
wcc526 / html_workflow.md
Created September 26, 2015 06:46
html workflow

常见 workflow

assets

  • icons
  • logos
  • stock

html

@wcc526
wcc526 / wed.md
Created September 26, 2015 06:47
web.md

缓存

强制刷新的话,会在请求头部添加

Pragma:no-cache 和 Cache-Control:no-cache 字段

Last-Modified

表示资源的最后修改时间,浏览器在请求的时候会在请求头中添加一个 If-Modified-Since 字段,查询是否是最新的,如果是返回304

@wcc526
wcc526 / scss.md
Created September 26, 2015 06:49
scss.md

scss

sass --watch style.scss:style.css --style expanded
sass --watch style.scss:style.css --style compressed
@wcc526
wcc526 / html.md
Created September 26, 2015 06:50
html.md

CSS Convention

  • 一律使用 SCSS 撰寫 CSS
  • CSS 裡用到的圖片放在 assets/stylesheets/images
  • 站上的圖片如 logo.pngsearch.png 放在 assets/images
  • 永遠不會改的靜態檔案如 robots.txtfavicon.ico 放在 public/ 下
  • 太大的圖片也放在 public/ 下
@wcc526
wcc526 / css.md
Created September 26, 2015 06:51
css.md
@wcc526
wcc526 / ruby_base.rb
Created September 26, 2015 06:56
ruby_base
require 'benchmark'
puts Benchmark.measure { 10000.times { print "." } }
Benchmark.bm do |x|
x.report('some test') {
N.times { some_test }
}
end
@wcc526
wcc526 / ruby_index.md
Created September 26, 2015 06:58
ruby_index.md

Ruby Syntax

  • 編輯器設定 soft tab (space=2),以 2 格空白符號做為程式內縮距離(不分語言)。
Sublime Text2 設定, Settings Default => 
// The number of spaces a tab is considered equal to
"tab_size": 2,

// Set to true to insert spaces when tab is pressed
@wcc526
wcc526 / ruby_adapter.md
Created September 26, 2015 06:59
ruby adapter