Chromium OS is cool. Chromium OS with crouton is cooler. Chromium OS with Docker is even cooler. This is specifically a guide for the Chromebook Pixel 2 (2015), but I can't think of any reason it wouldn't work with other devices.
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
:80 | |
root /usr/src/wordpress | |
gzip | |
fastcgi / wordpress:9000 php | |
rewrite { | |
if {path} not_match ^\/wp-admin | |
to {path} {path}/ /index.php?_url={uri} | |
} | |
log stdout | |
errors stderr |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
#!/usr/bin/env python | |
""" | |
Twitter's API doesn't allow you to get replies to a particular tweet. Strange | |
but true. But you can use Twitter's Search API to search for tweets that are | |
directed at a particular user, and then search through the results to see if | |
any are replies to a given tweet. You probably are also interested in the | |
replies to any replies as well, so the process is recursive. The big caveat | |
here is that the search API only returns results for the last 7 days. So |
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
jQuery(document).ready(function($){ | |
var body = $(document.body); | |
body.on('click', 'a[rel~="external"], a[target="_blank"]', function(e) { | |
e.preventDefault(); | |
var destination = window.open(); | |
destination.opener = null; | |
destination.location = this.href; | |
return false; | |
}); | |
}); |
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
#!/usr/bin/env python | |
""" | |
ordereddefaultdict.OrderedDefaultDict | |
.. code:: bash | |
$ python ./ordereddefaultdict.py -t | |
$ nosetests ./ordereddefaultdict.py | |
$ py.test ./ordereddefaultdict.py |
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
[root@plex ~]# cat /etc/systemd/system/minecraft@.service | |
[Unit] | |
Description=Minecraft Server %i | |
[Service] | |
WorkingDirectory=/opt/minecraft-%i | |
User=mcserver | |
Type=forking | |
ExecStart=/usr/bin/tmux new-session -s mc-%i -d '/bin/java -Xmx2048M -jar minecraft_server.jar nogui' |
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
Vagrant.configure(2) do |config| | |
config.vm.box = "ubuntu/trusty64" | |
config.vm.network "private_network", ip: "192.168.33.10" | |
config.vm.provision "shell", inline: <<-SHELL | |
apt-get update -q | |
su - vagrant | |
wget -q https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh | |
chmod +x miniconda.sh | |
./miniconda.sh -b -p /home/vagrant/miniconda | |
echo 'export PATH="/home/vagrant/miniconda/bin:$PATH"' >> /home/vagrant/.bashrc |
- Update HISTORY.rst
- Commit the changes:
git add HISTORY.rst
git commit -m "Changelog for upcoming release 0.1.1."
- Update version number (can also be patch or major)
bumpversion minor
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 | |
## newtab.sh -- newtab(), newwin() functions and osascripts for OSX Terminal | |
## src: https://stackoverflow.com/questions/7171725/open-new-terminal-tab-from-command-line-mac-os-x/12147804#12147804 | |
## license: Creative Commons cc by-sa 3.0 | |
function newtab { | |
# newtab() -- Open a new tab in the current Terminal window and | |
# optionally run a command. | |
# When invoked via a function named 'newwin', opens a new Terminal *window* instead. |