Skip to content

Instantly share code, notes, and snippets.

View jackyzonewen's full-sized avatar
👽
🖥 🏋🏼‍♀️ 🚴🏿‍♂️ 一天撸一斤代码

挡不住的君文 jackyzonewen

👽
🖥 🏋🏼‍♀️ 🚴🏿‍♂️ 一天撸一斤代码
  • 星网锐捷
  • 福州
View GitHub Profile

Sass/Less Comparison

In this document I am using Sass's SCSS syntax. You can choose to use the indented syntax in sass, if you prefer it, it has no functional differences from the SCSS syntax.

For Less, I'm using the JavaScript version because this is what they suggest on the website. The ruby version may be different.

Variables

@zwaldowski
zwaldowski / NSObject+Blocks.h
Created May 4, 2011 12:08
Perform blocks with delays and cancellation
//
// NSObject+Blocks.h
// Filemator
//
// Created by Zachary Waldowski on 4/12/11.
// Copyright 2011 Dizzy Technology. All rights reserved.
//
@interface NSObject (Blocks)
@jamztang
jamztang / UIView+JTRemoveAnimated.h
Created October 3, 2011 18:35
Adding fade out effect on -[UIView removeFromSuperview]
//
// UIView+JTRemoveAnimated.h
//
// Created by james on 9/1/11.
// http://ioscodesnippet.tumblr.com/
//
@interface UIView (JTRemoveAnimated)
- (void)removeFromSuperviewAnimated;
@adamgit
adamgit / .gitignore
Last active April 8, 2024 12:58
.gitignore file for Xcode4 / OS X Source projects
#########################
# .gitignore file for Xcode4 and Xcode5 Source projects
#
# Apple bugs, waiting for Apple to fix/respond:
#
# 15564624 - what does the xccheckout file in Xcode5 do? Where's the documentation?
#
# Version 2.6
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects
#
@jakebellacera
jakebellacera / how-to-install-memcache-on-mamp-2.md
Last active July 4, 2021 16:09
How To Install Memcache on MAMP 2

How To Install Memcache on MAMP 2

Note: This is an old guide and may not work for newer versions of macOS. Please see comments below for additional steps.

  1. Install memcached. I'd suggest using homebrew. brew install memcached
  2. Select your desired version of PHP that you'd like to use in MAMP. This dropdown is located in the PHP tab in MAMP PRO.
  3. Visit the Downloads Page on php.net and download the source code. If your release isn't listed, visit the Releases page.
  4. Extract the source into /Applications/MAMP/bin/php/[php version folder]/include/php.
  5. /Applications/MAMP/bin/php/[php version folder]/include/php/configure
  6. /Applications/MAMP/bin/php/[php version folder]/bin/pecl i memcache.
@azone
azone / open-in-blank.js
Created January 13, 2013 11:33
Open Octopress external link in new tab
function addBlankTargetForLinks () {
$('a[href^="http"]').each(function(){
$(this).attr('target', '_blank');
});
}
$(document).bind('DOMNodeInserted', function(event) {
addBlankTargetForLinks();
});
/*
* MethodSwizzle.h
*
* Copyright (c) 2007-2011 Kent Sutherland
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
* Software, and to permit persons to whom the Software is furnished to do so,
@goshacmd
goshacmd / fix_sys_rb.sh
Created June 12, 2013 07:41
OS X [REDACTED] Ruby 2.0 headers fix.
sys_rb_usr=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr
sdk_rb_usr=`xcode-select -p`/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr
sudo cp -r $sdk_rb_usr/include $sys_rb_usr/include
@supersha
supersha / storage-usage.js
Last active January 3, 2019 04:06
支持localStorage设置过期时间功能的封装代码
// expires方法的参数是以秒为单位的,其他的方法跟localStorage的相同
// 方法有:getItem/setItem/removeItem/clear/expires
// 30秒后过期
storage.setItem("test","hello world").expires(30);
storage.setItem("test","hello world");
storage.expires(30);
// clear全部由storage创建的localStorage
#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten