Skip to content

Instantly share code, notes, and snippets.

開 Project 流程

使用 Bootstrappers 產生 project

bootstrappers demo
cd demo
git init
git add .
git commit -m "init project" 
@raecoo
raecoo / monit-example.txt
Last active October 26, 2022 06:24
Monit (http://mmonit.com/monit/) script example
set daemon 20
set logfile syslog facility log_daemon
set mailserver smtp.gmail.com port 587
username "ERROR-EMAIL-ADDRESS" password "PASSWORD"
using tlsv1
with timeout 30 seconds
set alert ERROR-EMAIL-ADDRESS
set httpd port 2812 and
## 10 Gems you should know
* cancan
* settinglogic
* capistrano
* cells
* whenever
* backup
* workflow
* devise
* omniauth
* update_all
* find_in_batch
* transaction
<!DOCTYPE html>
<html>
<head>
<title>Demo</title>
<%= stylesheet_link_tag "application" %>
<%= stylesheet_link_tag "application", :media => "all" %>
<%= javascript_include_tag "application" %>
@xdite
xdite / gist:3130468
Created July 17, 2012 16:31
7 月書單

電子書

@xdite
xdite / 42-things.md
Created July 14, 2012 05:11
Ten (42) Things You Didn't Know Rails Could Do
@wildjcrt
wildjcrt / gist:2794231
Created May 26, 2012 14:55
UI Cafe Notes

UI Cafe Notes

Leo

Three Levels

  • idea (鉛筆草圖)
  • mockup
  • Photoshop/FireWorks Design
@jonathanmoore
jonathanmoore / gist:2640302
Created May 8, 2012 23:17
Get the share counts from various APIs

Share Counts

I have always struggled with getting all the various share buttons from Facebook, Twitter, Google Plus, Pinterest, etc to align correctly and to not look like a tacky explosion of buttons. Seeing a number of sites rolling their own share buttons with counts, for example The Next Web I decided to look into the various APIs on how to simply return the share count.

If you want to roll up all of these into a single jQuery plugin check out Sharrre

Many of these API calls and methods are undocumented, so anticipate that they will change in the future. Also, if you are planning on rolling these out across a site I would recommend creating a simple endpoint that periodically caches results from all of the APIs so that you are not overloading the services will requests.

Twitter

@myobie
myobie / mountain-lion-brew-setup.markdown
Created February 18, 2012 20:14
Get Mountain Lion and Homebrew to Be Happy

Get Mountain Lion and Homebrew to Be Happy

1) Install XCode 4.4 into /Applications

Get it from the App Store.

2) Install Command Line Tools

In XCode's Preferences > Downloads you can install command line tools.