I hereby claim:
- I am felipeochoa on github.
- I am fovc (https://keybase.io/fovc) on keybase.
- I have a public key whose fingerprint is 6AEE AC8F 9B16 8B71 430C 16A6 EA6F 759A D809 0E61
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
/** | |
* Children can override parent's context, which means context is a form of dynamic scoping. | |
* Tested at: https://jsfiddle.net/79e293az/ | |
* https://cdnjs.cloudflare.com/ajax/libs/react/15.3.2/react.js | |
* https://cdnjs.cloudflare.com/ajax/libs/react/15.3.2/react-dom.js | |
*/ | |
class Parent extends React.PureComponent { | |
getChildContext() { |
/* When using a PureComponent, changes to the store will still trigger re-renders of the children | |
* | |
* Tested with https://jsfiddle.net/poqf128w/4/ | |
* | |
* https://cdnjs.cloudflare.com/ajax/libs/react/15.3.2/react.js | |
* https://cdnjs.cloudflare.com/ajax/libs/react/15.3.2/react-dom.js | |
* https://cdnjs.cloudflare.com/ajax/libs/redux/3.6.0/redux.js | |
* https://cdnjs.cloudflare.com/ajax/libs/react-redux/4.4.5/react-redux.js | |
*/ | |
const names = [ |
(defun fov-list-packages-and-versions () | |
"Returns a list of all installed packages and their versions" | |
(mapcar | |
(lambda (pkg) | |
`(,pkg ,(package-desc-version | |
(cadr (assq pkg package-alist))))) | |
package-activated-list)) | |
;; Unfortunately the following function does not work | |
;; if the specific versions you need aren't the latest |
// ==UserScript== | |
// @name Check Netflix availability from you IMDB watchlist | |
// @namespace https://github.com/felipeochoa | |
// @description Filter your IMDB watchlist based on Netflix availability | |
// @author https://github.com/felipeochoa | |
// @include http://www.imdb.com/user/*/watchlist | |
// @include http://www.imdb.com/user/*/watchlist?* | |
// @include https://www.imdb.com/user/*/watchlist | |
// @include https://www.imdb.com/user/*/watchlist?* | |
// @version 1.0 |
I had to migrate what had started as a toy website and has now become a real website from running on sqlite to postgres today. I use a push-to-deploy setup, so the process was a bit tricky. I only needed like 10 minutes of downtime to do it, but had to make sure I had all the steps in order. For future record:
requirements.txt
to include psycopg2
and push the latest version of production
branch so that any migrations get applied on the sqlite DB and psycopg2
is installed in the virtual env.import re | |
TOKEN_RE = re.compile(r""" | |
(?P<scientific>[1-9](?:\.[0-9]+)?[Ee][+-]?[1-9][0-9]*)| | |
(?P<string>"(?:[^"]*"")*[^"]*"(?!"))| | |
(?P<link>'(?:[^']*'')*[^']*'(?!'))| | |
(?P<sq_bracket>\[[^]]*\])| | |
(?P<error>\#NULL!|\#DIV/0!|\#VALUE!|\#REF!|\#NAME?|\#NUM!|\#N/A)| | |
(?P<wspace>\ +)| | |
(?P<operator>[-+*/^&=%]|>=|<=|<>|>(?!=)|<(?![=>]))| |
#!/usr/bin/env python3 | |
""" | |
Used to fetch cover art. Based heavily on obeythepenguin's | |
`Cover Fetcher' (http://coverfetcher.sourceforge.net/) | |
obeythepenguin AT users.sourceforge.net, but attempting to | |
provide a CLI interface. | |
""" | |
import argparse |