Skip to content

Instantly share code, notes, and snippets.

View imZack's full-sized avatar
🤠
Make bugs

YuLun Shih imZack

🤠
Make bugs
  • Moxa
  • Taipei, Taiwan
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta name="referrer" content="never">
<script type="text/javascript">
(function(window) {
if (window.location !== window.top.location) {
window.top.location = window.location + '?install';
}
})(this);
@imZack
imZack / gist:5344046
Last active December 15, 2015 23:59
C# XML Save & Load
private void load()
{
XmlDocument doc = new XmlDocument();
doc.Load(rootPath + "\\config.xml");
XmlElement root = doc.DocumentElement;
name = root.GetAttribute("name");
XmlNodeList objs = root.SelectNodes("/ThemeConfig/Objects/Image");
foreach (XmlElement elem in objs)
{
@imZack
imZack / gist:5364468
Created April 11, 2013 15:40
Error msg of http://disp.cc 看來每次瀏覽這個網站都會被寫到資料庫 hmm....
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''',unix_timestamp(), '1.34.206.10','/b/index.php?page=read&bi=337&ti=5rFY',337,' at line 1
query: INSERT INTO userlist (qi, session_id, act_time, ip_addr, state, bi, ti) VALUES (,'',unix_timestamp(), '1.34.206.10','/b/index.php?page=read&bi=337&ti=5rFY',337,1298030)
@imZack
imZack / gist:5481767
Last active November 5, 2017 06:58
C# find-all-controls-in-wpf-window-by-type
/// <summary>
/// Form: http://stackoverflow.com/questions/974598/find-all-controls-in-wpf-window-by-type
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="depObj"></param>
/// <returns></returns>
public static IEnumerable<T> FindVisualChildren<T>(DependencyObject depObj) where T : DependencyObject
{
if (depObj != null)
{
@imZack
imZack / gist:5482596
Created April 29, 2013 16:03
C# SWAP Snippet
public static void Swap(ref byte foo, ref byte bar)
{
byte tmp = foo;
foo = bar;
bar = tmp;
}
class Htc {
public String name;
public Action action ;
public Htc(Action action) {
this.action = action;
}
}
interface Action {
@imZack
imZack / gist:5553135
Last active December 17, 2015 04:49
備份一下 鄉民的人肉 DDoS...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>鍵盤開戰 PTTA4K (β)</title>
<style type="text/css">
h1, h2, h3 { color: red; background-color: black; padding: 0; margin: 0; }
body { padding: 0; margin: 0; line-height: 32px; text-align: center; }
</style>
@imZack
imZack / gist:5554337
Created May 10, 2013 13:19
鄉民 DDoS 工具 介面漂亮版
<!doctype html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>鍵盤開戰 復刻 PTTATK</title>
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.min.css" rel="stylesheet">
</head>
<body>
<?php
function encodeURI($url) {
// http://php.net/manual/en/function.rawurlencode.php
// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/encodeURI
$unescaped = array(
'%2D'=>'-','%5F'=>'_','%2E'=>'.','%21'=>'!', '%7E'=>'~',
'%2A'=>'*', '%27'=>"'", '%28'=>'(', '%29'=>')'
);
$reserved = array(
'%3B'=>';','%2C'=>',','%2F'=>'/','%3F'=>'?','%3A'=>':',
@imZack
imZack / AnonTAIWAN.html
Created May 12, 2013 17:01
紀錄一下,插旗的一刻 (純備份)
<!DOCTYPE html>
<html lang="en">
<head>
<title>Anonymous #opphilippines #AnonTAIWAN #InHackWeTrust</title>
<style type="text/css">
@import url(http://fonts.googleapis.com/css?family=Anonymous+Pro:700);
body{background: black; text-align: center; color: white;font-family: 'Anonymous Pro', sans-serif;}
p{font-family: 'Anonymous Pro', sans-serif;font-size: 120%;}