Difficulty: Medium
Cohort | Date |
---|---|
Jan-15 | 2014-04-06 |
FROM redis:2.8.6 | |
# downgrade to Redis 2.8.4 | |
WORKDIR /usr/local/bin | |
# http://grainier.net/how-to-uninstall-redis-server-from-ubuntu | |
RUN rm -r redis-benchmark redis-check-aof redis-check-dump redis-cli redis-sentinel redis-server | |
WORKDIR / |
FROM ubuntu:14.04 | |
USER root | |
# set timezone to UTC by default | |
RUN ln -sf /usr/share/zoneinfo/Etc/UTC /etc/localtime | |
# use unicode | |
RUN locale-gen C.UTF-8 || true | |
ENV LANG=C.UTF-8 |
Difficulty: Medium
Cohort | Date |
---|---|
Jan-15 | 2014-04-06 |
// given the traditional correspondences between numbers & letters on a telephone, as follows: | |
const phone = { | |
'2': 'ABC', | |
'3': 'DEF', | |
'4': 'GHI', | |
'5': 'JKL', | |
'6': 'MNO', | |
'7': 'PQRS', | |
'8': 'TUV', |
/* if you're trying to embed this on your blog or website: | |
0. generate yr embed code as usual from https://moonconnection.com/moon_module.phtml | |
- replace the js file path with this one | |
1. use https://rawgit.com to spoof headers | |
- full url for this file is https://cdn.rawgit.com/isar0se/0c9c6580ee5097389a16aaa00e8c7673/raw/35dea55bce3955524d29d2024d7b6a06b4e32ce0/ccm_fl.js | |
- if you try to past the raw file url in directly, the content type will be 'plain text' not 'javascript' or w/e | |
2. chrome disables flash autoplay by default & there's no way to un-disable it | |
- the moon embed is annoying if there's a play button | |
- but if you bump the embed width* to something like 700 at least (not sure the exact cutoff), chrome assumes it's content & not advertising & allows autoplay | |
- autoplay is enabled via the '&autoPlay=true' param in the FlashVars string |
/* TWO-COLOR PROBLEM, | |
i.e., whether or not a given undirected, connected graph is bipartite: | |
https://en.wikipedia.org/wiki/Bipartite_graph */ | |
/* complexity [of non-recursive Fullstack Academy solution] ? O(n*n) i believe, O(n*n+n) technically */ | |
/* can we do better ? definitely */ | |
/* given a graph */ | |
let zero = {num: 0}, |