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!
\
"use strict"; | |
var maxWaitTimeoutMs = 5000; // 5secs | |
var webdriver = require('selenium-webdriver'); | |
var flow = webdriver.promise.controlFlow(); | |
/** | |
* Custom Jasmine matcher builder that waits for an element to have | |
* or not have an html class. | |
* @param {String} expectation The html class name |
foo | bar | baz | |
---|---|---|---|
a | 1 | ||
b | 2 | ||
c | |||
4 | |||
e | 5 |
People
![]() :bowtie: |
😄 :smile: |
😆 :laughing: |
---|---|---|
😊 :blush: |
😃 :smiley: |
:relaxed: |
😏 :smirk: |
😍 :heart_eyes: |
😘 :kissing_heart: |
😚 :kissing_closed_eyes: |
😳 :flushed: |
😌 :relieved: |
😆 :satisfied: |
😁 :grin: |
😉 :wink: |
😜 :stuck_out_tongue_winking_eye: |
😝 :stuck_out_tongue_closed_eyes: |
😀 :grinning: |
😗 :kissing: |
😙 :kissing_smiling_eyes: |
😛 :stuck_out_tongue: |
⇐ back to the gist-blog at jrw.fi
First there was JSLint, and there was much rejoicing. The odd little language called JavaScript finally had some static code analysis tooling to go with its many quirks and surprising edge cases. But people gradually became annoyed with having to lint their code according to the rules dictated by Douglas Crockford, instead of their own.
So JSLint got forked into JSHint, and there was much rejoicing. You could set it up to only complain about the things you didn't want to allow in your project, and shut up about the rest. JSHint has been the de-facto standard JavaScript linter for a long while, and continues to do so. Yet there will always be things your linter could check for you, but doesn't: your team has agreed on some convention that makes sense for them, but JSHint doesn't have an option
Now located at https://github.com/JeffPaine/beautiful_idiomatic_python.
Github gists don't support Pull Requests or any notifications, which made it impossible for me to maintain this (surprisingly popular) gist with fixes, respond to comments and so on. In the interest of maintaining the quality of this resource for others, I've moved it to a proper repo. Cheers!
Everyone who's reading this, please leave your opinion/ideas/proposals as a comment for a better world!
Most of you guys read Josh' proposals to make components more reusable, I think. Now, reading through this proposals definitely gives a feeling that this is the right way. Anyways, If you haven't read it yet, you should.
So Josh shows us, how angular apps can be structured in a better and more reusable way. Reusability is a very important thing when it comes to software development. Actually the whole angularjs library follows a philosophy of reusability. Which is why you able to make things like:
import os | |
import random | |
from scrapy.conf import settings | |
class RandomUserAgentMiddleware(object): | |
def process_request(self, request, spider): | |
ua = random.choice(settings.get('USER_AGENT_LIST')) | |
if ua: | |
request.headers.setdefault('User-Agent', ua) | |
class ProxyMiddleware(object): |
from django.core.exceptions import MiddlewareNotUsed | |
from django.conf import settings | |
import cProfile | |
import pstats | |
import marshal | |
from cStringIO import StringIO | |
class ProfileMiddleware(object): | |
def __init__(self): | |
if not settings.DEBUG: |
// FROM: http://www.mongodb.org/display/DOCS/Updating#Updating-update%28%29 | |
// | |
// db.collection.update( criteria, objNew, upsert, multi ) | |
// criteria - query which selects the record to update; | |
// objNew - updated object or $ operators (e.g., $inc) which manipulate the object | |
// upsert - if this should be an "upsert"; that is, if the record does not exist, insert it | |
// multi - if all documents matching criteria should be updated | |
// | |
// SQL VERSION: | |
// UPDATE myTable SET dateField = '2011-01-01' WHERE condField = 'condValue' |