Fortunatly we could use pre-built gccemacs right now.
Those two repos did the greate job for us.
https://github.com/twlz0ne/nix-gccemacs-darwin
https://github.com/twlz0ne/nix-gccemacs-sierra
Here is the tutorial:
Fortunatly we could use pre-built gccemacs right now.
Those two repos did the greate job for us.
https://github.com/twlz0ne/nix-gccemacs-darwin
https://github.com/twlz0ne/nix-gccemacs-sierra
Here is the tutorial:
Read this first: http://akrl.sdf.org/gccemacs.html
For that you need to compile gcc (duh). I edited Homebrew's gcc formula:
This program uses the Python cplex
library to solve a max flow/min cut problem. More information
on max flow/min cut is available in the Wikipedia article.
The basic idea is to assign flow to each edge such that no edge's flow exceeds that edge's capacity.
Be aware that a linear program may not always be the most efficient technique for solving max flow/min cut. This gist is intended more as a demonstration of how to use CPLEX in Python.
The graph I used is:
const defaultIfZero = (a, x) => x === 0 ? a : x; | |
const isDefined = x => x !== void 0; | |
const isUndefined = x => x === void 0; | |
const NONE = Symbol('NONE'); | |
const chalk = require('chalk'); | |
const val = x => (x === NONE ? (x = 'none', chalk.bold.grey) : chalk.cyan)(String(x)); | |
let highlightActiveNode = null; | |
let highlightedEdges = []; |
(defun todo-create-directory (directory) | |
"Creates the todo directory." | |
(if (file-exists-p directory) (message "Directory exists") | |
(make-directory directory) | |
(message "Directory created") | |
)) | |
(defun create-todo-file (directory filename) | |
"Checks if the todo file exists if not creates it." | |
(todo-create-directory directory) |
This notes is written by Sheldon. You can find me with #iOSBySheldon in Github, Youtube, Facebook, etc.
Convert .mov/.MP4 to .gif
As a developer, I feel better to upload a short video when I create the pull request to show other viewers what I did in this PR. I tried .mov format directly got after finishing recording screen using Quicktime, however, gif offers preview in most web pages, and has smaller file size.
This is not limited to developer, anyone has this need can use this method to convert the files.
def runningInDocker(): | |
with open('/proc/self/cgroup', 'r') as procfile: | |
for line in procfile: | |
fields = line.strip().split('/') | |
if fields[1] == 'docker': | |
return True | |
return False |
If a project has to have multiple git repos (e.g. Bitbucket and Github) then it's better that they remain in sync.
Usually this would involve pushing each branch to each repo in turn, but actually Git allows pushing to multiple repos in one go.
If in doubt about what git is doing when you run these commands, just