Skip to content

Instantly share code, notes, and snippets.

@kf4x
kf4x / create_swarm_cluster.sh
Created July 27, 2023 21:10 — forked from alexei-led/create_swarm_cluster.sh
Deploy Docker Compose (v3) to Swarm (mode) Cluster
#!/bin/bash
# vars
[ -z "$NUM_WORKERS" ] && NUM_WORKERS=3
# init swarm (need for service command); if not created
docker node ls 2> /dev/null | grep "Leader"
if [ $? -ne 0 ]; then
docker swarm init > /dev/null 2>&1
fi
@kf4x
kf4x / HWTemplate.tex
Last active August 29, 2015 14:15 — forked from dcernst/HWTemplate.tex
% --------------------------------------------------------------
% This is all preamble stuff that you don't have to worry about.
% Head down to where it says "Start here"
% --------------------------------------------------------------
\documentclass[12pt]{article}
\usepackage[margin=1in]{geometry}
\usepackage{amsmath,amsthm,amssymb}
package com.bugcloud.android.slider;
import android.app.Activity;
import android.util.Log;
import android.view.MotionEvent;
public class SlidableActivity extends Activity {
protected static final String TAG = "SlidableActivity";
private static final int ACTION_TYPE_DEFAULT = 0;
private static final int ACTION_TYPE_UP = 1;