- What is CSS selector specificity and how does it work?
- What's the difference between a relative, fixed, absolute and statically positioned element?
- Can you explain the difference between px, em and rem as they relate to font sizing?
- What are
data-
attributes good for? - Describe the difference between
<script>
,<script async>
and<script defer>
. - Why is it generally a good idea to position CSS
<link>
s between<head></head>
and JS<script>
s just before</body>
? Do you know any exceptions? - Why you would use a
srcset
attribute in an image tag? Explain the process the browser uses when evaluating the content of this attribute. - What is the difference between
canvas
andsvg
? - What is progressive rendering?
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
#!/bin/bash | |
mongodb1=`getent hosts ${MONGO1} | awk '{ print $1 }'` | |
mongodb2=`getent hosts ${MONGO2} | awk '{ print $1 }'` | |
mongodb3=`getent hosts ${MONGO3} | awk '{ print $1 }'` | |
port=${PORT:-27017} | |
echo "Waiting for startup.." | |
until mongo --host mongo:27017 --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 2)' &>/dev/null; do |
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
version: '3' | |
services: | |
mongo: | |
image: mongo:latest | |
volumes: | |
- .tockmongo:/data/db | |
ports: | |
- "27017:27017" |
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
var Dictionary; | |
if (!Dictionary) { | |
Dictionary = {}; | |
} | |
(function () { | |
'use strict'; | |
function f(n) { | |
// Format integers to have at least two digits. |
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
#!/bin/sh | |
git diff --quiet --exit-code | |
if [ $? -ne 0 ]; then | |
echo "Cannot run grrr if you have uncommited changes" | |
exit -1; | |
fi | |
current_branch=`git rev-parse --abbrev-ref HEAD` | |
if [ "$current_branch" == "HEAD" ]; then |
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
RUBY_MAJOR=1 | |
RUBY_MINOR=9 | |
RUBY_TEENY=3 | |
RUBY_PATCH_LEVEL=194 | |
RUBY_NAME="$RUBY_MAJOR.$RUBY_MINOR.$RUBY_TEENY-p$RUBY_PATCH_LEVEL-falcon-fotonauts" | |
BRANCH_NAME="falcon_and_fotonauts_""$RUBY_MAJOR""_""$RUBY_MINOR""_""$RUBY_TEENY""_""$RUBY_PATCH_LEVEL" | |
cat <<-EOS > "/tmp/$RUBY_NAME" |
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
def smallAsciiRepresentation(digest) | |
digestParts = digest.unpack("Q2") # digest is a 128 bit buffer, cut it into two 64 bits ruby Integer | |
smallDigestPart = digestParts[0] ^ digestParts[1] # XOR the two 64 bits parts | |
smallDigest = [smallDigestPart].pack("Q") # and transform the result into a 64 bits binary buffer | |
smallDigestB64 = [smallDigest].pack("m") # b64-encode the result | |
smallID = smallDigestB64.gsub(/[\n=]/, '').gsub(/\+/,'-').gsub(/\//,'_') # and make it URL-friendly by shortening it (no '=' at the end, no '+', no '/') | |
return smallID | |
end |