http://ln.hixie.ch/?start=1037910467&count=1
http://ln.hixie.ch/?start=1137740632&count=1
| package org.springframework.web.servlet.support; | |
| import java.io.IOException; | |
| import javax.servlet.FilterChain; | |
| import javax.servlet.ServletException; | |
| import javax.servlet.http.HttpServletRequest; | |
| import javax.servlet.http.HttpServletResponse; | |
| import org.springframework.web.filter.OncePerRequestFilter; |
| - (IBAction)clickedCloseButton:(id)sender { | |
| UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"Discard post?" | |
| delegate:self | |
| cancelButtonTitle:@"Cancel" | |
| destructiveButtonTitle:@"Discard" | |
| otherButtonTitles:@"Save draft", nil]; | |
| [actionSheet showInView:self.view]; | |
| } | |
| // UIActionSheetDelegate methods |
| <?php | |
| // Add role class to body | |
| function add_role_to_body($classes) { | |
| foreach (wp_get_current_user()->roles as $user_role) { | |
| $classes[] = 'role-'. $user_role; | |
| } | |
| return $classes; | |
| }); | |
| add_filter('body_class','add_role_to_body'); |
| (function (window) { | |
| // This library re-implements setTimeout, setInterval, clearTimeout, clearInterval for iOS6. | |
| // iOS6 suffers from a bug that kills timers that are created while a page is scrolling. | |
| // This library fixes that problem by recreating timers after scrolling finishes (with interval correction). | |
| // This code is released in the public domain. Do with it what you want, without limitations. I do not promise | |
| // that it works, or that I will provide support (don't sue me). | |
| // Author: rkorving@wizcorp.jp | |
| var timeouts = {}; |
| (function (window) { | |
| // This library re-implements setTimeout, setInterval, clearTimeout, clearInterval for iOS6. | |
| // iOS6 suffers from a bug that kills timers that are created while a page is scrolling. | |
| // This library fixes that problem by recreating timers after scrolling finishes (with interval correction). | |
| // This code is free to use by anyone (MIT, blabla). | |
| // Original Author: rkorving@wizcorp.jp | |
| var timeouts = {}; | |
| var intervals = {}; | |
| var orgSetTimeout = window.setTimeout; | |
| var orgSetInterval = window.setInterval; |
| @media only screen and (min--moz-device-pixel-ratio: 1.5), /* Gecko */ | |
| only screen and (-o-min-device-pixel-ratio: 3/2), /* Opera */ | |
| only screen and (-webkit-min-device-pixel-ratio: 1.5), /* Webkit */ | |
| only screen and (min-device-pixel-ratio: 1.5), /* Webkit */ | |
| only screen and (min-resolution: 144dpi) /* W3 */ | |
| { | |
| .button-icon { | |
| background-image: url("path/to/image/name@2x.png"); | |
| background-size: 16px 16px; | |
| } |
| Basically, UIPasteBoard allows us to share data to other application. Below is an example of UIpasteBoard usage. | |
| COPY | |
| UIPasteboard *appPasteBoard = [UIPasteboard generalPasteboard]; | |
| appPasteBoard.persistent = YES; | |
| [appPasteBoard setString:@"STRING TO COPY"]; | |
| PASTE |
| #import <UIKit/UIKit.h> | |
| @interface HighChartViewController : UIViewController | |
| @property (weak, nonatomic) IBOutlet UIWebView *webView; | |
| @property (strong, nonatomic) NSArray* seriesArray; | |
| @property (copy, nonatomic) NSString* optionFileName; | |
| @end |
| ### Filesystem jumping | |
| ### Usage: Just add a line to your ~/.bashrc or ~/.bash_profile with "source /path/to/fsjumps.sh". | |
| export MARKPATH=$HOME/.marks | |
| function jump { | |
| cd -P "$MARKPATH/$1" 2>/dev/null || echo "No such mark: $1" | |
| } |