Skip to content

Instantly share code, notes, and snippets.

- name: Docker Swarm - Checking Swarm Mode status
command: "docker info"
register: "docker_info"
changed_when: false
check_mode: no
become: true
tags: [docker-swarm]
- name: Docker Swarm - Initializing Docker Swarm Mode on first manager
command: >
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
if (/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM) != nil
config.vm.synced_folder ".", "/vagrant", mount_options: ["dmode=700,fmode=600"]
config.vm.synced_folder "/data", "/data", type: "rsync", rsync__auto: true, mount_options: ["dmode=777,fmode=777"]
else
config.vm.synced_folder ".", "/vagrant"
config.vm.synced_folder "/data", "/data", type: "rsync", rsync__auto: true, mount_options: ["dmode=777,fmode=777"]
#!/bin/bash
# Allow toggling components to install and update based off flags
updateconsul=1
updatedocker=1
updatedockermachine=1
updatedockercompose=1
updatedockerswarm=1
consulversion="0.5.2"
export function tryCatch({
tryer,
catcher
}) {
return (props) => {
try {
return tryer(props);
} catch (e) {
return catcher(props, e.message);
}
@eldorplus
eldorplus / instructions.md
Created June 4, 2019 10:21 — forked from alextanhongpin/instructions.md
Setting up locale on alpine:3.6 docker image

Locale

When using the alpine docker image, the command locale -a or locale-gen does not exist. You might need them to install different locales in your docker image to allow your applications to support multilingual. Most common issue is when dealing with database inputs (MySQL), whereby the text will be displayed as garbage characters if you do not have the right locale installed.

FROM alpine:3.6

# ---not shown here---
@eldorplus
eldorplus / .gitlab-ci.yml
Created June 3, 2019 07:41 — forked from dinukasal/.gitlab-ci.yml
Gitlab CI for react-native builds
image: openjdk:8-jdk
# image: jangrewe/gitlab-ci-android
variables:
ANDROID_COMPILE_SDK: "23"
ANDROID_BUILD_TOOLS: "23.0.1"
ANDROID_SDK_TOOLS: "3859397"
before_script:
@eldorplus
eldorplus / PlatformTouchable.tsx
Created May 31, 2019 14:34 — forked from brunolemos/PlatformTouchable.tsx
TypeScript version of react-native-platform-touchable
// Source: https://github.com/react-community/react-native-platform-touchable
import React, { PureComponent, ReactNode } from 'react'
import {
BackgroundPropType,
Platform,
StyleProp,
TouchableNativeFeedback,
TouchableNativeFeedbackProperties,
TouchableNativeFeedbackStatic,
TouchableOpacity,
@eldorplus
eldorplus / IPTV_Links.strm
Created May 14, 2019 20:59 — forked from thebitbrine/IPTV_Links.strm
~700 480p/720p IPTV Links
@eldorplus
eldorplus / README-setup-tunnel-as-systemd-service.md
Created May 13, 2019 15:24 — forked from drmalex07/README-setup-tunnel-as-systemd-service.md
Setup a secure (SSH) tunnel as a systemd service. #systemd #ssh #ssh-tunnel #ssh-forward

README

Create a template service file at /etc/systemd/system/[email protected]. The template parameter will correspond to the name of target host:

[Unit]
Description=Setup a secure tunnel to %I
After=network.target
@eldorplus
eldorplus / README-setup-tunnel-as-systemd-service.md
Created May 13, 2019 15:24 — forked from drmalex07/README-setup-tunnel-as-systemd-service.md
Setup a secure (SSH) tunnel as a systemd service. #systemd #ssh #ssh-tunnel #ssh-forward

README

Create a template service file at /etc/systemd/system/[email protected]. The template parameter will correspond to the name of target host:

[Unit]
Description=Setup a secure tunnel to %I
After=network.target