Skip to content

Instantly share code, notes, and snippets.

View zetavg's full-sized avatar

Pokai Chang zetavg

View GitHub Profile
Pow(der) + Apache + MySQL + PHP on Mac OS X
===========================================
* 參考 [http://bentoncreation.com/post/43279873217/pow-awesomeness-for-php-static-sites](http://bentoncreation.com/post/43279873217/pow-awesomeness-for-php-static-sites)。
## [Pow](http://pow.cx/)
```
curl get.pow.cx | sh
@zetavg
zetavg / treeeeeee
Last active December 31, 2015 20:39
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
typedef struct bTreeNode *bTreePointer;
typedef struct bTreeNode {
char data;
bTreePointer leftChild, rightChild;
} bTreeNode;
@zetavg
zetavg / NTUST-GetWebFlow.php
Created January 21, 2014 08:37
`/NTUST-GetWebFlow.php?ip=140.118.x.x` `$ php NTUST-GetWebFlow.php 140.118.x.x`
<?php
// 請求
if (defined('STDIN')) {
$IP = $argv[1];
} else {
$IP = $_GET['ip'];
}
// 領表單
@zetavg
zetavg / httpd.conf
Created March 9, 2014 18:14
Apache2 conf to ban access to sensitive files
<Files ~ "(^\.git|.swp$)">
Order allow,deny
Deny from all
Satisfy all
</Files>
@zetavg
zetavg / Commands For Compress And Decompressesing
Created March 13, 2014 12:55
bash commands for compress and decompressesing
# COMMANDS FOR COMPRESS AND DECOMPRESSESING
# Usage:
# mk* OutputFileName.* InputDirName
# do* InputFileName
# un* InputFileName.*
#
# tar
alias mktar='tar cvf'
alias untar='tar xvf'
# gz
@zetavg
zetavg / README.md
Last active August 29, 2015 13:59
2014 西門子超級實習生初選投票 網站漏洞

2014 西門子超級實習生投票 網站漏洞

http://www.siemens-greenplus.com/2014ssip/

此漏洞已回報。

Facebook 登入竟然直接寫在前端,登入後把資料寫在 hidden 的 input 欄位,按下投票就把 hidden input 的 value 丟給後端直接建立投票資料 Orz。

實作

brew install https://raw.github.com/cbguder/homebrew/53ea33bab5372ea74117ace8c44aa7ea988e93c2/Library/Formula/pngout.rb
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# http://EditorConfig.org
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
charset = utf-8
// ----- z-index ----- //
@mixin z-index($element, $elements: $zIndex-elements, $base: 10) {
$index: index($elements, $element);
@if $index == false {
@warn "There is no item "#{$element}" in the z-index list, please choose one of: #{$elements}'";
} @else {
z-index: index($elements, $element) + $base;
}
}

How to install ipkg on a Synology DS214

After a couple of days of trying to get ipkg woking on my DS214 I found this article by trepmag. It is written for the DS213j, but it’s been working for me and others for the DS214 too.

I have done some minor changed to clarify some things, but if you are a Linux guy (unlike me) my changes might be of no use to you.

Guide