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
var Webflow = Webflow || []; | |
Webflow.push(function() { | |
MemberStack.onReady.then(function(member) { | |
// handle the link click yourself | |
function triggerClick(event) { | |
event.preventDefault(); | |
window.location.assign("https://website.com?id=" + member.id); | |
} | |
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
<input type="hidden" name="Member Id" ms-data="id"> | |
<input type="hidden" name="Comment Id" value=''> | |
<script> | |
var Webflow = Webflow || []; | |
Webflow.push(function() { | |
$('#Name').val(''); | |
$('#Comment').val(''); | |
}); | |
</script> |
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
<script> | |
var Webflow = Webflow || []; | |
Webflow.push(function() { | |
$(document).on('submit', 'form', function() { | |
setTimeout(function() { location.reload(true); }, 3000); | |
}); | |
}); | |
</script> |
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
# ----------- | |
# In reference to: | |
# http://www.albertoalmagro.com/ruby-methods-defined-in-rake-tasks/ | |
# ----------- | |
# Rakefile | |
# Load tasks | |
Dir.glob('*.rake').each do |path| | |
load path | |
end |
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
# ~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ | |
# | |
# ~= Coding Challenge =~ | |
# | |
# The following coding challenge was presented to me: | |
# | |
# Write some code, that will flatten an array of arbitrarily nested | |
# arrays of integers into a flat array of integers. | |
# e.g. [[1,2,[3]],4] -> [1,2,3,4]. | |
# |
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)insertNewObject { | |
// Create a new instance of the entity managed by the fetched results controller. | |
NSManagedObjectContext *context = [self.fetchedResultsController managedObjectContext]; | |
NSEntityDescription *entity = [[self.fetchedResultsController fetchRequest] entity]; | |
// Loop through array of hashes and save | |
for (NSMutableDictionary *story in stories) { | |
NSManagedObject *storiesData = [NSEntityDescription insertNewObjectForEntityForName:[entity name] inManagedObjectContext:context]; |
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
# ---------------------- | |
# Chris Dritsas | |
# Code Example | |
# ---------------------- | |
# return flattened array | |
def squash(data=[]) | |
# validate | |
raise "argument must be a non-empty array" if data.empty? or !data.is_a? Array |
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
<h3>Collect Name of Restaurant, Phone Number and Address from URL provided.</h3> | |
<div class="highlight-box"> | |
<ul> | |
<li>For this "HIT url" below, enter the Name of the Restaurant, the Phone Number, and the Address</li> | |
</ul> | |
<ul> | |
<li>Example - Name of Restaurant: <b><i>Guerilla Cafe</i></b></li> | |
<li>Example - Phone Number: <b><i>(510) 845-2233</i></b></li> | |
<li>Example - Address: <b><i>1620 Shattuck Ave, Berkeley, CA 94709</i></b></li> | |
<li>Exmaple above can be found at this url (<u>this is only an example url and <b>NOT</b> the "HIT url" - do <b>NOT</b> collect data from this example url</u>): http://bit.ly/UR3Oki</li> |
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
def tip(msg); puts; puts msg; puts "-"*100; end | |
# | |
# 30 Ruby 1.9 Tips, Tricks & Features: | |
# http://www.igvita.com/2011/02/03/new-ruby-19-features-tips-tricks/ | |
# | |
tip "Upgrading to Ruby 1.9 is simple: rvm install 1.9.2 && rvm --default 1.9.2" | |
tip "Ruby 1.9 supports named captures in regular expressions!" |
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
UIImageView *iconView = [[[UIImageView alloc] initWithFrame:CGRectMake( | |
50, | |
25, | |
24, | |
16 | |
)] autorelease]; | |
UIImage *iconImage = [UIImage imageNamed:@"eye.png"]; | |
iconView.image = iconImage; | |
[[cell contentView] addSubview:iconView]; |
NewerOlder