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
target_email = '[email protected]' # Email of the person you are cloning the pitch site to | |
target_domain = 'crushpath' #subdomain of the user you are cloning the pitch site to | |
new_name = 'event-planning' #Name of the pitch site as needed by the user | |
copy_url = "http://crushpath.crushpath.me/djennifer/event-planning" #public url of the pitch site you are cloning from. | |
if target_domain.blank? || target_email.blank? || new_name.blank? || copy_url.blank? | |
puts "Required arguments:" | |
puts "\tsubdomain=acme - the subdomain for the target user" | |
puts "\[email protected] - the user being copied to" | |
puts "\tname=upside - the new vanity name" | |
puts "\tcopy_url=http://crushpath.crushpath.me/sam - full url of the site to copy" |
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
zozi (kf: b2b-race-deal) ~ gem install therubyracer -v '0.11.4' | |
Building native extensions. This could take a while... | |
ERROR: Error installing therubyracer: | |
ERROR: Failed to build gem native extension. | |
/Users/kfarst/.rvm/rubies/ruby-1.9.3-p545/bin/ruby -r ./siteconf20141023-59714-db82zv.rb extconf.rb | |
checking for main() in -lpthread... yes | |
checking for main() in -lobjc... yes | |
checking for v8.h... no | |
*** extconf.rb failed *** |
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
pickerWidthScaleRatio = (self.view.frame.width / 2.0) / pickerNaturalWidth | |
pickerHeightScaleRatio = self.view.frame.height / pickerNaturalHeight | |
timePicker.transform = CGAffineTransformMakeScale(pickerWidthScaleRatio, pickerHeightScaleRatio) |
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
import java.io.*; | |
import java.util.*; | |
class Solution { | |
private static boolean isPalindrome( final String input ) { | |
if(input.length()==0){ | |
return false; | |
} | |
String intput2 = input.replace(" ",""); | |
int length = intput2.length()-1; |
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
module Callable | |
def call(*args, &block) | |
new(*args).call(&block) | |
end | |
module WithLogging | |
def call(*args, &block) | |
with_logging(*args) do | |
new(*args).call(&block) | |
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
import java.io.*; | |
import java.util.*; | |
import org.junit.*; | |
import org.junit.runner.*; | |
public class Solution { | |
public static class PalindromeTester { | |
public boolean isPalindrome( final String input ) { | |
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
function jadenCase (input) { | |
// Split the input into an array of individual words | |
var words = input.split(' '); | |
for (var i = 0; i < words.length; i++) { | |
// For each word take the first letter, captialize it, take the rest of the word, lowercase it, | |
// then re-assign the modified word to the current position in the array | |
words[i] = words[i].charAt(0).toUpperCase() + words[i].substr(1).toLowerCase(); | |
} | |
// Join the array of words back together into a string separated by spaces |
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
function transposeTwoStrings (string1, string2) { | |
var i = 0 | |
// Continue checking each letter of each string as long as at least one of the strings still has letters | |
while (string1[i] !== undefined || string2[i] !== undefined) { | |
var letterColumn = ''; | |
// As long as the index we're at still has a letter, append it to the string, otherwise append an empty space | |
if (string1[i] !== undefined) { | |
letterColumn = letterColumn.concat(string1[i]); |
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
function fizzBuzzCustom (fizz, buzz, firstDivisibility, secondDivisibility) { | |
var incrementedArray = []; | |
// Set to the argument or default to 'Fizz' | |
fizz = fizz || 'Fizz'; | |
// Set to the argument or default to 'Buzz' | |
buzz = buzz || 'Buzz'; | |
// Set to the argument or default to 3 |
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
//: Playground - noun: a place where people can play | |
import UIKit | |
import PlaygroundSupport | |
class Responder: NSObject { | |
@objc func segmentedControlValueChanged(_ sender: UISegmentedControl) { | |
UIView.animate(withDuration: 0.3) { | |
buttonBar.frame.origin.x = (segmentedControl.frame.width / CGFloat(segmentedControl.numberOfSegments)) * CGFloat(segmentedControl.selectedSegmentIndex) | |
} |
OlderNewer