Skip to content

Instantly share code, notes, and snippets.

{
"ease": [0.25, 0.1, 0.25, 1.0],
"linear": [0.00, 0.0, 1.00, 1.0],
"ease-in": [0.42, 0.0, 1.00, 1.0],
"ease-out": [0.00, 0.0, 0.58, 1.0],
"ease-in-out": [0.42, 0.0, 0.58, 1.0]
}
// want to uses this module like:
// `var $ = require('jquery');`
//
// so it incudes all plugins
var jquery = require('actual-jquery');
require('plugin.jquery');
module.exports = jquery;
@moudy
moudy / PomTaskView+Constraints.m
Last active December 22, 2015 18:49
Constraints category
#import "PomTaskView+Constraints.h"
@implementation PomTaskView (Constraints)
- (void)updateConstraints {
[super updateConstraints];
NSMutableArray *constraints = [NSMutableArray new];
NSDictionary *views = [self subviewsDictionary];
@moudy
moudy / transparent-gif.html
Created October 18, 2013 19:18
Base64 Encode of 1x1px Transparent GIF
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7">
<FilesMatch "\.(eot|woff|svg|ttf)$">
RewriteEngine On
# Let proxy servers with empty referer through
RewriteCond %{HTTP_REFERER} ^$
RewriteCond %{HTTP:VIA} !^$ [OR]
RewriteCond %{HTTP:USERAGENT_VIA} !^$ [OR]
RewriteCond %{HTTP:FORWARDED} !^$ [OR]
RewriteCond %{HTTP:FORWARDED-FOR} !^$ [OR]
RewriteCond %{HTTP:X-FORWARDED} !^$ [OR]
class CommentsTableViewBackgroundView: UIView {
dynamic var isEmpty = true
dynamic var isLoading = false
let activityIndicator = UIActivityIndicatorView(activityIndicatorStyle: .WhiteLarge)
lazy var label: UILabel = {
let label = UILabel()
process.on('uncaughtException', function(err) {
console.log('Threw Exception: ', err, err.stack);
});
# Usage
ProfileQuery.call(1)
# Object
class ProfileQuery
def self.call(options)
new(options).call
end
def initialize(profile_id)
@moudy
moudy / gist:0098b07fc9a22fe529bd
Created February 19, 2015 17:08
openname verification
Verifying that +moudy is my openname (Bitcoin username). https://onename.com/moudy
extension DataStore {
enum Endpoint {
case OrganizationPosts(String)
case LikePost(Int)
case CreatePost
case CreatePostComment(Int)
case GetPostComments(Int)