Skip to content

Instantly share code, notes, and snippets.

@andyyou
andyyou / color.rb
Created October 30, 2011 07:58
colordiff
color = ["ffffff","f9fcfe","eaf5fd","dbeefb","cce6f9","bddff7","add8f5","9ed0f4","8fc9f2","71baee","61b3ed","52abeb","43a4e9"]
color.inject do |f,s|
color = f.to_s
next_color = s.to_s
first = color[0,2].hex
second = color[2,2].hex
third = color[4,2].hex
next_color_first = next_color[0,2].hex
@andyyou
andyyou / gist:3052671
Created July 5, 2012 09:46
C# Controls abbreviation
btn Button chk CheckBox ckl CheckedListBox
cmb ComboBox dtp DateTimePicker lbl Label
llb LinkLabel lst ListBox lvw ListView
mtx MaskedTextBox cdr MonthCalendar icn NotifyIcon
nud NumeircUpDown pic PictureBox prg ProgressBar
rdo RadioButton rtx RichTextBox txt TextBox
tip ToolTip tvw TreeView wbs WebBrowser
容器
flp FlowLayoutPanel grp GroupBox pnl Panel
@andyyou
andyyou / gist:4730995
Created February 7, 2013 13:42
bash_profile
# Load other application
if [ -f `brew --prefix`/etc/bash_completion ]; then
. `brew --prefix`/etc/bash_completion
fi
if [ -f ~/.git-prompt.sh ]; then
source ~/.git-prompt.sh
export PS1='Geoff[\W]$(__git_ps1 "(%s)"): '
fi
@andyyou
andyyou / HomeController.cs
Created March 9, 2013 07:14
Sample for comment
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace MvcSample.Controllers
{
public class HomeController : Controller
{
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AryList
{
class Program
@andyyou
andyyou / gist:5254115
Created March 27, 2013 13:23
Scope description and toturial links
http://goo.gl/Mrc9x
http://goo.gl/ui9w2
http://goo.gl/x355h (Important)
http://goo.gl/NizzP
http://goo.gl/mP2uq
Scope
變數並不是永久長存的,也不會一直在程式裡面儲存著。
每個變數都有它作用的限制範圍,或者也可以說是變數的生存期限。
而這個範圍,就稱作「Scope」。今天你在某個地方宣告了變數,但是只要超出了變數的 scope,就無法使用它了。
@andyyou
andyyou / gist:5269825
Created March 29, 2013 09:31
key generate
ssh-keygen -t rsa -C "your_email@example.com"
pbcopy < ~/.ssh/id_rsa.pub
@andyyou
andyyou / gist:5329077
Created April 7, 2013 04:48
about virtual and override confuse
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Obj5
{
class Program
{
@andyyou
andyyou / gist:5525200
Created May 6, 2013 13:37
Nugel List
ASP.NET MVC Basic 專案 Nuget 預設安裝
<Basic>
1. Microsoft.NET Framework 4 HTTP Client Libraries + 繁體中文資源
2. Microsoft ASP.NET MVC 4 + 繁體中文資源
3. Microsoft ASP.NET MVC Fixed DisplayModes + 繁體中文資源
4. Microsoft ASP.NET Razor 2 + 繁體中文資源
5. Microsoft ASP.NET Web API Client Libraries + 繁體中文資源
6. Microsoft ASP.NET Web API Core Libraries + 繁體中文資源
7. Microsoft ASP.NET Web API Web Host + 繁體中文資源
@andyyou
andyyou / gist:5525220
Last active December 17, 2015 00:59
Nuget List
ASP.NET MVC Basic 專案 Nuget 預設安裝
<Basic>
<Empty>
1. Microsoft.NET Framework 4 HTTP Client Libraries + 繁體中文資源
2. Microsoft ASP.NET MVC 4 + 繁體中文資源
3. Microsoft ASP.NET MVC Fixed DisplayModes + 繁體中文資源
4. Microsoft ASP.NET Razor 2 + 繁體中文資源
5. Microsoft ASP.NET Web API Client Libraries + 繁體中文資源
6. Microsoft ASP.NET Web API Core Libraries + 繁體中文資源