This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ps aux | grep -w "cmus$" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/usr/local/bin/cmus-remote -n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/usr/local/bin/cmus-remote -r |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'formula' | |
class BrewCask < Formula | |
homepage 'https://github.com/phinze/brew-cask/' | |
head 'git://github.com/patrickkettner/brew-cask.git' | |
skip_clean :all | |
def install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* System Versioning Preprocessor Macros (by mwaterfall) | |
*/ | |
#define SYSTEM_VERSION_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame) | |
#define SYSTEM_VERSION_GREATER_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending) | |
#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending) | |
#define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending) | |
#define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:eval(function(p,a,c,k,e,d){e=function(c){return%20c.toString(36)};if(!''.replace(/^/,String)){while(c--){d[c.toString(a)]=k[c]||c.toString(a)}k=[function(e){return%20d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new%20RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return%20p}('g%20f(){6(j.h)7%20j.h;6(9.e&&9.e.a)7%209.e.a;6(9.l.a)7%209.l.a;7%200}g%20q(){2%204=f();2%201=0;2%20b=4;6(b<k){d(0,1);7}2%20c=p.r(b/k);2%205=p.r(b/s);2%203=1>4?4+5:4-5;2%208=0;6(1>4){m(2%20i=4;i<1;i+=5){n("o.d(0,%20"+3+")",8*c);3+=5;6(3>1)3=1;8++}7}m(2%20i=4;i>1;i-=5){n("o.d(0,%20"+3+")",8*c);3-=5;6(3<1)3=1;8++}}q();',29,29,'|stopY|var|leapY|startY|step|if|return|timer|document|scrollTop|distance|speed|scrollTo|documentElement|currentYPosition|function|pageYOffset||self|100|body|for|setTimeout|window|Math|smoothScroll|round|25'.split('|'),0,{})) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* A little Object Relational Mapper in PHP | |
* @author dennis.hotson@gmail.com | |
*/ | |
class Post | |
{ | |
public $title; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)savePhotoOfView:(UIView *)view | |
{ | |
UIGraphicsBeginImageContext(view.bounds.size); | |
[view drawRect:view.bounds]; | |
UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); | |
UIGraphicsEndImageContext(); | |
UIImageWriteToSavedPhotosAlbum(image, | |
self, | |
@selector(savedPhotoImage:didFinishSavingWithError:contextInfo:), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ (UIImage *)imageWithColor:(UIColor *)color width:(float)width height:(float)height { | |
CGRect rect = CGRectMake(0.0f, 0.0f, width, height); | |
UIGraphicsBeginImageContext(rect.size); | |
CGContextRef context = UIGraphicsGetCurrentContext(); | |
CGContextSetFillColorWithColor(context, [color CGColor]); | |
CGContextFillRect(context, rect); | |
UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); | |
UIGraphicsEndImageContext(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, $url); | |
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, FALSE); | |
curl_setopt($ch, CURLOPT_HEADER, true); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); | |
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post_fields)); | |
$header = curl_exec($ch); | |
curl_close($ch); | |
?> |