Skip to content

Instantly share code, notes, and snippets.

@iveskins
iveskins / gist:95783acc0a799da3cf2a23e09042f764
Created February 19, 2019 04:58
How to restart a single container with docker-compose
108
The other answers to restarting a single node are on target, docker-compose restart worker. That will bounce that container, but not include any changes, even if you rebuilt it separately. You can manually stop, rm, create, and start, but there are much easier methods.
If you've updated your code, you can do the build and reload in a single step with:
docker-compose up --detach --build
That will first rebuild your images from any changed code, which is fast if there are no changes since the cache is reused. And then it only replaces the changed containers. If your downloaded images are stale, you can precede the above command with:
docker-compose pull
[server]
SERVER
[server:vars]
server_name=SERVER
docker_nginx_ssl=true
@iveskins
iveskins / iterm2.md
Created August 24, 2018 08:51 — forked from squarism/iterm2.md
iterm2 cheatsheet

Tabs and Windows

Function Shortcut
Fullscreen + Enter
Previous Tab + Left Arrow
Next Tab + Right Arrow
Go to Tab + Number
Go to Window + Option + Number
Go to Split Pane by Direction + Option + Arrow
@iveskins
iveskins / 00_README.md
Created February 1, 2018 10:19 — forked from emk/00_README.md
Anki subs2srs card template, with optional hint and note

To use these templates, you'll need to create a new Anki "note type" with the following fields:

  • Sound
  • Time
  • Source
  • Image
  • Target: line
  • Base: line
  • Target: line before
  • Base: line before
@iveskins
iveskins / index.html
Last active September 21, 2017 02:22 — forked from bunkat/index.html
Round date scale
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.axis text {
font: 10px sans-serif;
}
.axis path, .axis line {
fill: none;
@iveskins
iveskins / target.stream.twitch.sh
Created September 7, 2017 16:29
stream to twitch from ffmpeg needs xwininfo. click on window after running
#! /bin/bash
# streaming on Ubuntu via ffmpeg.
# see http://ubuntuguide.org/wiki/Screencasts for full documentation
# see http://www.thegameengine.org/miscellaneous/streaming-twitch-tv-ubuntu/
# for instructions on how to use this gist
if [ ! -f ~/.twitch_key ]; then
echo "Error: Could not find file: ~/.twitch_key"
echo "Please create this file and copy past your stream key into it. Open this script for more details."
@iveskins
iveskins / .screenrc
Last active September 3, 2017 08:52 — forked from joaopizani/.screenrc
A killer GNU Screen Config
# the following two lines give a two-line status, with the current window highlighted
hardstatus alwayslastline
hardstatus string '%{= kG}[%{G}%H%? %1`%?%{g}][%= %{= kw}%-w%{+b yk} %n*%t%?(%u)%? %{-}%+w %=%{g}][%{B}%m/%d %{W}%C%A%{g}]'
# huge scrollback buffer
defscrollback 5000
# no welcome message
startup_message off
@iveskins
iveskins / katakana2english.regex.rb
Created April 21, 2017 17:36
trying to change katakana to be read with more natural pronunciation. but .. probably better to go from english to ipa to this half katakana mix .. coming back from katakana you cant tell the v from the b ect
file = File.open("klist.txt")
conts = file.read
#Fs
re = /(フェ)|(ファ)|(フォ)|(フー)|(フィ)/
subst = {'フェ' => 'fェ', 'ファ'=> 'fァ', 'フォ' => 'fォ', 'フー' => 'fー', 'フィ' => 'fィ'}
result = conts.gsub(re, subst)
@iveskins
iveskins / app.js
Created March 31, 2017 16:43
playing with angular-chart.js and ngResource
var app = angular.module('flapperNews', ['ui.router','chart.js','ngResource'])
app.config([
'$stateProvider',
'$urlRouterProvider',
function($stateProvider,$urlRouterProvider){
$stateProvider
.state('home',{
url: '/home',
templateUrl: '/home.html',
#! /bin/bash
# function to create all dirs til file can be made
function mkdirs {
file="$1"
dir="/"
# convert to full path
if [ "${file##/*}" ]; then
file="${PWD}/${file}"