This file contains hidden or 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
var page = new WebPage(), testindex = 0, loadInProgress = false; | |
page.onConsoleMessage = function(msg) { | |
console.log(msg); | |
}; | |
page.onLoadStarted = function() { | |
loadInProgress = true; | |
console.log("load started"); | |
}; |
This file contains hidden or 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
var content; | |
var casper = require('casper').create(); | |
function getContent() { | |
return document.querySelectorAll('html')[0].outerHTML; | |
} | |
casper.start('https:site/login.html', function() { | |
// search for 'casperjs' from google form | |
this.fill('form[method="post"]', { 'login': 'login', 'passwd': 'pwd' }, true); |
This file contains hidden or 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
// pdf delivery | |
-(void)deliverPDFAttachment { | |
NSLog(@"this is attachment path %@", attachmentPath); | |
NSURL *documentURL = [NSURL fileURLWithPath:attachmentPath]; | |
PSPDFDocument *document = [PSPDFDocument PDFDocumentWithURL:documentURL]; | |
document.editableAnnotationTypes = [NSSet setWithObjects: | |
PSPDFAnnotationTypeStringLink, // not added by default. | |
PSPDFAnnotationTypeStringHighlight, | |
PSPDFAnnotationTypeStringUnderline, |
This file contains hidden or 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
GEM | |
remote: http://rubygems.org/ | |
specs: | |
actionmailer (2.3.5) | |
actionpack (= 2.3.5) | |
actionpack (2.3.5) | |
activesupport (= 2.3.5) | |
rack (~> 1.0.0) | |
activerecord (2.3.5) | |
activesupport (= 2.3.5) |
This file contains hidden or 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)loadResults:(NSArray*)searchResults { | |
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; | |
NSMutableArray* elementsToAdd = [NSMutableArray arrayWithCapacity:100]; | |
NSMutableArray* rowsToAdd = [NSMutableArray arrayWithCapacity:100]; | |
@synchronized(self) { | |
for(NSMutableDictionary* searchResult in searchResults) { | |
// adding an entry from syncing new items | |
[elementsToAdd addObject:searchResult]; | |
[rowsToAdd addObject:[NSIndexPath indexPathForRow:self.nResults inSection:0]]; |
This file contains hidden or 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
// | |
// UIView+Addons.m | |
// Breeze | |
// | |
// Created by Abdullah Bakhach on 5/15/13. | |
// | |
// | |
#import "NSObject+Addons.h" | |
#import <objc/runtime.h> |
This file contains hidden or 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
[self.overallContainerView addConstraintFormats:@[[NSString stringWithFormat:@"V:[overallContainer(>=%f)]",overallContainerHeight], | |
[NSString stringWithFormat:@"V:[iconsContainer]-%f-|",(imageSize.height+ kLargePadding*2)], | |
@"V:[selectedContainer(==35)]-0-|", | |
@"|-10-[selectedContainer(>=300)]", | |
@"V:[tagWrapper(==tagButton+10)]-35-|", | |
@"[tagWrapper(==tagButton+30))]", | |
] | |
withBindingDict:@{@"overallContainer":_overallContainerView, | |
@"iconsContainer":_iconsContainerView, |
This file contains hidden or 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
ffmpeg -i "A State of Trance #637.mp4" "A State of Trance #637.mp3" | |
ffmpeg version N-58502-g738ebb4 Copyright (c) 2000-2013 the FFmpeg developers | |
built on Nov 28 2013 10:55:55 with Apple LLVM version 5.0 (clang-500.2.76) (based on LLVM 3.3svn) | |
configuration: | |
libavutil 52. 55.100 / 52. 55.100 | |
libavcodec 55. 44.100 / 55. 44.100 | |
libavformat 55. 21.102 / 55. 21.102 | |
libavdevice 55. 5.102 / 55. 5.102 | |
libavfilter 3. 91.100 / 3. 91.100 | |
libswscale 2. 5.101 / 2. 5.101 |
This file contains hidden or 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
source 'https://rubygems.org' | |
gem 'rails', '3.2.13' | |
group :development do | |
gem 'capistrano' | |
gem 'capistrano-ext' | |
gem 'rvm-capistrano' | |
end |
This file contains hidden or 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
$ cat $(which bundle) | |
#!/usr/bin/env ruby_executable_hooks | |
# | |
# This file was generated by RubyGems. | |
# | |
# The application 'bundler' is installed as part of a gem, and | |
# this file is here to facilitate running it. | |
# | |
require 'rubygems' |
OlderNewer