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
@imZack
imZack / gist:5604734
Created May 18, 2013 15:05
常用表情符號
(  ̄ c ̄)y▂ξ
 ∧_∧  あっ!
(´・ω・)
O┬O )   
◎┴し'-◎ ≡
( ′-`)y-~
~ˋ( ̄▽ ̄#)ˊ~
@imZack
imZack / fb_spam.html
Created May 23, 2013 07:31
又是一個惡意 FB 網站

<!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>Shocking Video</title>
<link rel="stylesheet" href="http://2.7.be.static.xlhost.com/style3.css" type="text/css" />
@imZack
imZack / .tmux.conf
Last active October 11, 2019 23:05 — forked from josephj/.tmux.conf
# General configuration.
# $ tmux show-options -g
set -g base-index 1
set -g display-time 5000
set -g repeat-time 1000
set -g status-keys vi
set -g status-bg black
set -g status-fg white
set -g status-justify left
set -g status-interval 1
/*
* draw a multiline string rotated in a canvas
*
* @param ctx (M) context of the canvas
* @param text (M) string may contain \n
* @param posX (M) horizontal start position
* @param posY (M) vertical start position
* @param textColor color
* @param rotation in degrees (by 360)
* @param font must be installed on client use websafe

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@imZack
imZack / zsh.md
Created December 16, 2013 05:47 — forked from tsabat/zsh.md
USE [AdventureWorks2012]
GO
:setvar checkpoint_files_location "h:\Databases\DATA\"
/*************************** Add MEMORY_OPTIMIZED_DATA filegroup to enable in-memory OLTP **********************************/
IF NOT EXISTS (SELECT * FROM sys.data_spaces WHERE type='FX')
ALTER DATABASE CURRENT ADD FILEGROUP [AdventureWorks2012_mod] CONTAINS MEMORY_OPTIMIZED_DATA
GO
@imZack
imZack / README.md
Created April 19, 2014 16:41 — forked from oodavid/README.md

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
# -*- coding: utf-8 -*-
"""
This script will delete all of the tweets in the specified account.
You may need to hit the "more" button on the bottom of your twitter profile
page every now and then as the script runs, this is due to a bug in twitter.
You will need to get a consumer key and consumer secret token to use this
script, you can do so by registering a twitter application at https://dev.twitter.com/apps
@requirements: Python 2.5+, Tweepy (http://pypi.python.org/pypi/tweepy/1.7.1)
@imZack
imZack / find_dunplicate
Last active August 29, 2015 14:04
This script will finds sanji.log's duplicate line.
from sets import Set
import collections
lines = []
with open('/tmp/sanji.log', 'r') as f:
lines = f.readlines()
boots = list()
bufferLines = list()
for line in lines: