I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
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
! Block friends favourited tweets | |
twitter.com##.tweet-has-context:not([data-retweeter]) | |
! fake activity | |
twitter.com##li[data-component-context="generic_activity"] | |
! since you were away | |
twitter.com##.TimelineTweetsModule | |
! don't care what's trending | |
twitter.com##.trends.Trends.module |
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 'json' | |
def clone_repo | |
page_num = 1 | |
loop do | |
# replace sf-grasshoppers-2015 with your cohort name | |
json = %x[curl 'https://api.github.com/orgs/sf-grasshoppers-2015/repos?per_page=100&page=#{page_num}' -u <username>:<personal_access_token>] | |
json = JSON.parse(json) | |
break if json.empty? | |
json.each { |repo| %x[git clone #{repo["ssh_url"]} ] } | |
page_num += 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
package auth | |
import ( | |
"context" | |
"net/http" | |
"strings" | |
"google.golang.org/grpc/metadata" | |
"github.com/andela/micro-api-gateway/pb/authorization" |
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
I got some nice tips from my soundcloud colleagues on what font they used for code in presentations: | |
http://input.fontbureau.com/ | |
http://hivelogic.com/articles/top-10-programming-fonts/ | |
https://madmalik.github.io/mononoki/ | |
I think Consolas looks good |
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
// connect() is a function that injects Redux-related props into your component. | |
// You can inject data and callbacks that change that data by dispatching actions. | |
function connect(mapStateToProps, mapDispatchToProps) { | |
// It lets us inject component as the last step so people can use it as a decorator. | |
// Generally you don't need to worry about it. | |
return function (WrappedComponent) { | |
// It returns a component | |
return class extends React.Component { | |
render() { | |
return ( |
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') |