Want to create a Gist from your editor, the command line, or the Services menu? Here's how.
| ;; htmlutil - Some useful tools for working with HTML text and HTTP URLs | |
| ; This module provides tools for escaping HTML text, with HTML | |
| ; entities for special characters; and for escaping strings to be | |
| ; safely included into URLS; and back. | |
| ;; Primary commands: | |
| ; html-escape-str - Escape (quote) a character for HTML | |
| ; html-unescape-str - Un-escape an HTML entity string | |
| ; url-quote-str - Quote special characters in a URL string |
I took down this Gist due to concerns about the security of the encryption/decryption part of this code (see comments below).
Rob Napier (@rnapier) has created a publicly available class that provides similar AES encryption/decryption functionality at https://github.com/rnapier/RNCryptor.
| UIImage *scaleAndRotateImage(UIImage *image) | |
| { | |
| int kMaxResolution = 1920; | |
| CGImageRef imgRef = image.CGImage; | |
| CGFloat width = CGImageGetWidth(imgRef); | |
| CGFloat height = CGImageGetHeight(imgRef); | |
| :+1: | |
| :-1: | |
| :airplane: | |
| :art: | |
| :bear: | |
| :beer: | |
| :bike: | |
| :bomb: | |
| :book: | |
| :bulb: |
原文:Scaling Isomorphic Javascript Code (This is just for study, please contact me at tily05 atmark gmail.com if any problem.)
考えてみれば Model-View-Controller とか MVC ってよく聞くよね。実際どんなものか知ってる? 抽象的に言うなら「オブジェクト情報の保持されるグラフィック・システム (つまり、ラスターではないグラフィック。ゲームとか) 上に構築された、表示系を中心としたアプリケーションにおいて、主要な機能どうしの関わりをうまく分離すること」とでも言おうか。もう少し深く考えを押し進めてみれば、これは当然、他のさまざまなアプリケーションにもあてはまる言葉 (bucket term ?) だ。
過去に多くの開発コミュニティが MVC による解決案を提供し、それによってよくあるユースケースにうまく対処し、地位を築くことができた。例をあげるなら、Ruby や Python コミュニティは Rails や Django を作り、MVC アーキテクチャを実現した。
| curl https://raw.github.com/gist/1588091/8b7b7a203074231f3dc75bdee48b3017078fb621/CentOS-Base.repo -o /etc/yum.repos.d/CentOS-Base.repo | |
| curl https://raw.github.com/gist/1588091/2e5ab750cd0603dd7210ea7a999d15f9aadae711/epel.repo -o /etc/yum.repos.d/epel.repo |
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
| /** | |
| It prevents UIDevice.uniqueIdentifier method from returning real UDID vaue. | |
| It is useful to prevent closed-source libralies to fetch users' UDIDs against | |
| your will. | |
| */ | |
| @interface UIDevice (UDIDkiller) | |
| -(NSString*)uniqueIdentifier; | |
| @end |
| # Title: A Liquid tag for Jekyll sites that allows embedding image file on | |
| # Instagram. | |
| # Authors: Nobuhiro Nikushi https://twitter.com/#!/niku4i | |
| # Description: Easily embed image file on Instagram page. | |
| # | |
| # Syntax {% instag [class name(s)] http://instagr.am/p/IYYs5bo0jd/ [width [height]] [title text | "title text" ["alt text"]] %} | |
| # | |
| # Examples: | |
| # {% instag http://instagr.am/p/IYYs5bo0jd/ %} | |
| # {% instag left half http://instagr.am/p/IYYs5bo0jd/ my title %} |