Skip to content

Instantly share code, notes, and snippets.

View color.rb
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 Jul 5, 2012
C# Controls abbreviation
View gist:3052671
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
View gist:4730995
# 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
View HomeController.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace MvcSample.Controllers
{
public class HomeController : Controller
{
View Program.cs
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 Mar 27, 2013
Scope description and toturial links
View gist:5254115
http://goo.gl/Mrc9x
http://goo.gl/ui9w2
http://goo.gl/x355h (Important)
http://goo.gl/NizzP
http://goo.gl/mP2uq
Scope
變數並不是永久長存的,也不會一直在程式裡面儲存著。
每個變數都有它作用的限制範圍,或者也可以說是變數的生存期限。
而這個範圍,就稱作「Scope」。今天你在某個地方宣告了變數,但是只要超出了變數的 scope,就無法使用它了。
View gist:5269825
ssh-keygen -t rsa -C "your_email@example.com"
pbcopy < ~/.ssh/id_rsa.pub
@andyyou
andyyou / gist:5329077
Created Apr 7, 2013
about virtual and override confuse
View gist:5329077
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Obj5
{
class Program
{
View gist:5525200
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 + 繁體中文資源
View gist:5525220
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 + 繁體中文資源