This walkthrough installs Sphinx and configures it to output HTML and PDF from .md
.
If you install it on a VM, allocate over 25GB storage and multiple processors.
You'll need Ubuntu 16.04 LTS, an internet connection, and sudo
rights.
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
# macOS xargs has no -d (delimiter) option. But you can use BASH to do something similar : | |
cat myfile.txt | grep \n | while read -r line ; do echo "$line"; done |
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
variable "region" {} | |
variable "access_key" {} | |
variable "secret_key" {} | |
provider "aws" { | |
version = "~> 1.25" | |
region = "${var.region}" | |
access_key = "${var.access_key}" | |
secret_key = "${var.secret_key}"} |
I was unable to boot to live Linux distro to install Linux on my newly bought A485 ThinkPad laptop. Although I was initially dissapointed, I was not alone. This gist documents the information I gathered from the net to complete the installation.
At the time of posting this gist, the issue is still persistent. It might not be relevant anymore once Lenovo release a working BIOS update to resolve the issue. [Update 19/01/2019]: Updating to BIOS 1.14 worked for me.
The information in this short gist was compiled from several sources. Although most are for E series, it worked for A485:
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
(function () { | |
const timeContainer = document.querySelectorAll( | |
".ytd-thumbnail-overlay-time-status-renderer" | |
); | |
let timeSeconds = 0; | |
for (let i = 0; i < timeContainer.length; i++) { | |
const timeStr = timeContainer[i].innerText; | |
if (!/\d?\d:\d{2}(:\d{2})?/g.test(timeStr)) continue; | |
const timeParts = timeStr.split(":"); |
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
from keras.models import load_model | |
from keras.preprocessing import image | |
import numpy as np | |
import os | |
# image folder | |
folder_path = '/path/to/folder/' | |
# path to model | |
model_path = '/path/to/saved/model.h5' | |
# dimensions of images |
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
# See https://codeship.com/documentation/docker/browser-testing/ | |
FROM myapp:base | |
# We need wget to set up the PPA and xvfb to have a virtual screen and unzip to install the Chromedriver | |
RUN apt-get install -y wget xvfb unzip | |
# Set up the Chrome PPA | |
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - | |
RUN echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list |
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 contextlib | |
import OpenSSL.crypto | |
import os | |
import requests | |
import ssl | |
import tempfile | |
@contextlib.contextmanager | |
def pfx_to_pem(pfx_path, pfx_password): | |
''' Decrypts the .pfx file to be used with requests. ''' |
There are two types of markup in Liquid: Output and Tag.
- Output markup (which may resolve to text) is surrounded by
{{ matched pairs of curly brackets (ie, braces) }}
- Tag markup (which cannot resolve to text) is surrounded by
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
// Reference: http://www.blackdogfoundry.com/blog/moving-repository-from-bitbucket-to-github/ | |
// See also: http://www.paulund.co.uk/change-url-of-git-repository | |
$ cd $HOME/Code/repo-directory | |
$ git remote rename origin bitbucket | |
$ git remote add origin https://github.com/mandiwise/awesome-new-repo.git | |
$ git push origin master | |
$ git remote rm bitbucket |
NewerOlder