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
package darren.rogan; | |
public class SolutionImpl { | |
String permute(String text){ | |
int length = text.length(); | |
boolean[] used = new boolean[length]; |
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
public class Question { | |
void arrayquestion(){ | |
int[] numbs = new int[]{1, 3, 5, 8, 9, 2, 6, 7, 6, 8, 9}; | |
//int[] numbs = new int[]{1, 3, 5, 8, 1, 2, 6, 7, 6, 8, 9}; | |
//int[] numbs = new int[]{10, 1, 2, 3, 4, 5, 6, 7}; | |
//int[] numbs = new int[]{1, 1}; | |
int hops = arrayquestion_sub(numbs,0,1,numbs.length,1); | |
System.out.println(hops); | |
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
//Given a binary search tree | |
//write an algorith the common ancestor | |
//who's difference = k | |
//assume the value = int | |
public class Tree{ | |
TreeNode root; | |
int size; | |
... |
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
package objsets | |
import common._ | |
import TweetReader._ | |
import scala.annotation._ | |
/** | |
* A class to represent tweets. | |
*/ | |
class Tweet(val user: String, val text: String, val retweets: Int) { |
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
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
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
# Usage: add_gh_key <github username> | |
# Credit - https://github.com/darrenrogan | |
function add_gh_key() { | |
NAME=$1 && KEY="$(curl -s https://github.com/$NAME.keys)" && echo "$KEY" $NAME >> ~/.ssh/authorized_keys | |
} |
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
Just for future reference, running this on my pc now. | |
aws s3 cp images s3://restspace-restarea-photo/images --recursive --acl public-read | |
Using an extension called wintee to write to a text file (and the console at the same time). I think tee is build in for osx. |
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
sudo du -hd 5 * > /tmp/folder_size.txt |
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
aws --profile restspace s3 sync s3://restspace-restarea-images s3://restspace-restarea-photo-prod |
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
aws --profile production cognito-idp list-users --user-pool-id us-west-2_XXXXXXXXX --output table > ~/users.txt |
OlderNewer