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
# Adapted from https://gist.github.com/kees-jan/5768479 | |
# Install oh-my-zsh first: see https://ohmyz.sh/#install | |
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" && \ | |
git clone git://github.com/andsens/homeshick.git $HOME/.homesick/repos/homeshick && \ | |
source $HOME/.homesick/repos/homeshick/homeshick.sh && \ | |
homeshick -b clone https://github.com/royseto/dotfiles.git && \ | |
homeshick -f link && \ | |
source $HOME/.zshrc |
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
const functions = require('firebase-functions'); | |
const { App } = require('@slack/bolt'); | |
const app = new App({ | |
token: process.env.SLACK_BOT_TOKEN, | |
signingSecret: process.env.SLACK_SIGNING_SECRET | |
}); | |
// Listens to incoming messages that contain "hello" | |
app.message('hello', ({ message, say }) => { |
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
(defun get-previous-indentation () | |
"Get the column of the previous indented line" | |
(interactive) | |
(save-excursion | |
(progn | |
(move-beginning-of-line nil) | |
(skip-chars-backward "\n \t") | |
(back-to-indentation)) | |
(current-column))) |
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
# https://hub.docker.com/r/tensorflow/tensorflow/ | |
docker run -it -p 8888:8888 gcr.io/tensorflow/tensorflow:latest-py3 |
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 busybox | |
RUN /bin/mkdir -p /mnt/data && /bin/touch /mnt/data/hello.txt | |
VOLUME ["/mnt/data"] | |
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/bash | |
fpm -s dir -t deb -n postgres9.4.1-postgis2.1.5 -v 9.4.1-2.1.5-local1 \ | |
-d build-essential -d libreadline-dev -d zlib1g-dev -d flex \ | |
-d bison -d libxml2-dev -d libxslt-dev -d libssl-dev -d wget \ | |
--description "PostgreSQL 9.4.1 with PostGIS 2.1.5 built on Ubuntu 14.04 in /usr/local/" \ | |
-x /usr/local/bin/fpm -x /usr/local/lib/python3.4 -x /usr/local/lib/site_ruby \ | |
/usr/local/bin /usr/local/include /usr/local/lib /usr/local/pgsql /usr/local/share | |
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
➜ tmp seq 1 10 | parallel -j4 --eta echo '{%} {}' | |
Computers / CPU cores / Max jobs to run | |
1:local / 16 / 4 | |
Computer:jobs running/jobs completed/%of started jobs/Average seconds to complete | |
ETA: 0s Left: 10 AVG: 0.00s local:4/0/100%/0.0s 1 1 | |
ETA: 0s Left: 9 AVG: 0.00s local:4/1/100%/0.0s 2 2 | |
ETA: 0s Left: 8 AVG: 0.00s local:4/2/100%/0.0s 3 3 | |
ETA: 0s Left: 7 AVG: 0.00s local:4/3/100%/0.0s 4 4 |
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
roysetosmacbook:~ royseto$ cd 'VirtualBox VMs/boot2docker-vm' | |
roysetosmacbook:boot2docker-vm royseto$ pwd | |
/Users/royseto/VirtualBox VMs/boot2docker-vm | |
roysetosmacbook:boot2docker-vm royseto$ ls -lh | |
total 80549936 | |
drwx------ 6 royseto staff 204B Aug 1 10:00 Logs | |
drwx------ 2 royseto staff 68B Aug 1 10:01 Snapshots | |
-rw------- 1 royseto staff 8.4K Aug 13 08:09 boot2docker-vm.vbox | |
-rw------- 1 royseto staff 8.4K Aug 1 10:01 boot2docker-vm.vbox-prev | |
-rw------- 1 royseto staff 38G Aug 13 08:09 boot2docker-vm.vdi |
Loading
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
# Prototype for transforming a set of time intervals with arrival and departure | |
# timestamps into utilization by hour | |
library(lubridate) | |
# Period start and end | |
period_start <- ymd("2015-04-01") | |
period_end <- ymd("2015-05-01") |
NewerOlder