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
response.writeHead(200, { | |
'p3p': ['policyref="http://foo.com/p3p.xml"', 'CP="OOO EEE OOH AH AHH"'], | |
'Set-Cookie': ['ting="tang; expires=0; path=/;"', 'wallawalla="bingbang; expires=123456789; path=/;"'], | |
'Content-Type': 'text/html' | |
}); |
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
/* | |
* This work is free. You can redistribute it and/or modify it under the | |
* terms of the Do What The Fuck You Want To Public License, Version 2, | |
* as published by Sam Hocevar. See the COPYING file for more details. | |
*/ | |
/* | |
* Easing Functions - inspired from http://gizma.com/easing/ | |
* only considering the t value for the range [0, 1] => [0, 1] | |
*/ | |
EasingFunctions = { |
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
#!/usr/bin/env bash | |
# | |
# Approach: | |
# 1. Find variable declaration in the form of "$my-var: anyvalue" | |
# 2. Loop through found variables and find occurrences of each variable in all sass files | |
# 3. Filter out vars that occurred only once | |
if [ -z "$1" ]; then | |
echo "Please specify a directory as the first argument." | |
exit 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width,initial-scale=1"> | |
<title>title</title> | |
<link rel="stylesheet" href="style.css"> | |
<script src="script.js"></script> | |
</head> | |
<body> |
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
/** | |
* Track JS error details in Universal Analytics | |
*/ | |
function trackJavaScriptError(e) { | |
var errMsg = e.message; | |
var errSrc = e.filename + ': ' + e.lineno; | |
ga('send', 'event', 'JavaScript Error', errMsg, errSrc, { 'nonInteraction': 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
What is the release date for 2.0? | |
No exact release date yet. They don't want what happened with 1.2.They want to | |
make sure they get it done right for 2.0 so they are not setting a date yet. | |
What is the plan for having a migration path for 2.0? How much rewriting of 1.x | |
apps will need to be done to migrate to 2.0? | |
Mishko said that there will definitely be a migration plan for 2.0. They dont know |
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
# Build arguments for the gn build | |
# You can set these with `gn args out/Default` | |
# ( and they're stored in src/out/Default/args.gn ) | |
# See "gn args out/Default --list" for available build arguments | |
# component build, because people love it | |
is_component_build = true | |
# release build, because its faster | |
is_debug = true |
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 Ale's fantastic Sketch Sandbox | |
// https://github.com/bomberstudios/sketch-sandbox | |
#import 'sketch-sandbox.js' | |
// Are we on a page or an artboard? | |
var page = doc.currentPage(); | |
var canvas = page.currentArtboard() ? page.currentArtboard() : page; | |
// Define the location of the file you want to import, using file:// protocol | |
var fileURL = NSURL.URLWithString("file:///Users/johndoe/Downloads/my_cat.svg"); |
I've heard this before:
What I really get frustrated by is that I cannot wrap
console.*
and preserve line numbers
We enabled this in Chrome DevTools via blackboxing a bit ago.
If you blackbox the script file the contains the console log wrapper, the script location shown in the console will be corrected to the original source file and line number. Click, and the full source is looking longingly into your eyes.
OlderNewer