Skip to content

Instantly share code, notes, and snippets.

View SammyLin's full-sized avatar
:octocat:
大家好

Sammy Lin SammyLin

:octocat:
大家好
View GitHub Profile
@SammyLin
SammyLin / gist:2731204
Created May 19, 2012 15:21 — forked from linpc/gist:2731159
JSDC.tw 2012 irc log
--- Day changed 六 5月 19 2012
01:23 Robin is now known as Guest3202
01:24 Guest3202 is now known as Pymaster
01:25 Pymaster is now known as pc035860
08:40 JSDC-Kay_ is now known as JSDC-Kay
08:49 < JSDC-Kay> 大家好!我是今天負責為各位進行實況轉播的 Kay!
08:50 < JSDC-df1> 大家好!我是今天負責為各位進行實況轉播的 df1!
08:51 < Kande_> 真是太好了^^
08:51 salagadool is now known as salagadoola_
08:55 < ericsk> Good morning~
# Home
桌子:IKEA GALANT http://www.ikea.com/tw/zh/catalog/products/S59885197/ $3959
電腦:iMac 27" i5 8G ram ~$75000
鍵盤: Filco 茶軸 $3200
滑鼠:Magic Mouse $2390
滑鼠墊:eZova $500
耳機: QC15 $12000
椅子: Aeron $38000
@SammyLin
SammyLin / gist:4140097
Created November 24, 2012 15:20 — forked from xdite/gist:3072362
deploy/asset.rb
# -*- encoding : utf-8 -*-
set :assets_dependencies, %w(app/assets lib/assets vendor/assets Gemfile.lock config/routes.rb)
namespace :deploy do
namespace :assets do
desc <<-DESC
Run the asset precompilation rake task. You can specify the full path \
to the rake executable by setting the rake variable. You can also \
@SammyLin
SammyLin / 0_reuse_code.js
Created March 22, 2014 15:44
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@SammyLin
SammyLin / rails_resources.md
Created March 22, 2014 16:01 — forked from jookyboi/rails_resources.md
Rails-related Gems and guides to accelerate your web project.

Gems

  • Bundler - Bundler maintains a consistent environment for ruby applications. It tracks an application's code and the rubygems it needs to run, so that an application will always have the exact gems (and versions) that it needs to run.
  • rabl - General ruby templating with json, bson, xml, plist and msgpack support
  • Thin - Very fast and lightweight Ruby web server
  • Unicorn - Unicorn is an HTTP server for Rack applications designed to only serve fast clients on low-latency, high-bandwidth connections and take advantage of features in Unix/Unix-like kernels.
  • SimpleCov - SimpleCov is a code coverage analysis tool for Ruby 1.9.
  • Zeus - Zeus preloads your Rails app so that your normal development tasks such as console, server, generate, and specs/tests take less than one second.
  • [factory_girl](h
@SammyLin
SammyLin / javascript_resources.md
Created March 22, 2014 16:01 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
@SammyLin
SammyLin / css_resources.md
Created March 22, 2014 16:01 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

sudo apt-get update
sudo apt-get install -y libssl1.0.0 openssl
# Confirm Build Date is at least Aril 7th 2014
openssl version -a
# Restart all services listed by this command:
sudo lsof -n | grep ssl | grep DEL
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org>
#
WP_OWNER=www-data # <-- wordpress owner
WP_GROUP=www-data # <-- wordpress group
WP_ROOT=$1 # <-- wordpress root directory
@SammyLin
SammyLin / gist:5c17bdabc42e1f079cae
Created January 8, 2015 02:24 — forked from kogakure/gist:79851
刪除 Frontpage, WSFTP 等等產生的檔案 Bash: Get rid of those nasty files from Frontpage, WSFTP, etc.
#!/bin/bash
find . -name _vti_cnf -exec rm -rf {} \;
find . -name _borders -exec rm -rf {} \;
find . -name _private -exec rm -rf {} \;
find . -name _vti_pvt -exec rm -rf {} \;
find . -name _vti_txt -exec rm -rf {} \;
find . -name _vti_script -exec rm -rf {} \;
find . -name .DS_Store -exec rm -rf {} \;
find . -name WS_FTP.LOG -exec rm -rf {} \;