Skip to content

Instantly share code, notes, and snippets.

View rwcitek's full-sized avatar

Robert Citek rwcitek

View GitHub Profile
@rwcitek
rwcitek / build.dsub.docker.image.sh
Last active March 16, 2025 12:56
Build dsub Docker image
temp=$(date +%s)
cat <<'eof' > Dockerfile.${temp}
FROM ubuntu:24.04
ARG DEBIAN_FRONTEND=noninteractive
SHELL ["/bin/bash", "-c"]
# install the basics
RUN apt-get update && \
@rwcitek
rwcitek / slide-deck.existing.repo.sh
Created November 2, 2022 05:16
Creating a GH pages slide deck inside an existing repo
# This gist combines specific commits from two different repos: jekyll-and-slide and reveal.js
# - https://github.com/adamhollett/jekyll-and-slide
# - https://github.com/hakimel/reveal.js
# If there was a way to do this from the browser, this gist would be unnecessary.
# prerequisite: an existing repo in GitHub, no branch named "gh-pages", and note repo URL
REMOTE_URL='https://github.com/sluugdemogithub/demo03.git'
# create the URL for GitHub Pages
<<< "$REMOTE_URL" IFS='/' read scheme x host id repo
@rwcitek
rwcitek / dood.sh
Last active December 6, 2022 17:32
Docker out of Docker using Ubuntu 22.04
# adapted from: https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-22-04
## This allows a Docker container to connect to the Docker server on the host to manage Docker resources
# run a Docker instance in the background
docker container run \
--rm \
-v /var/run/docker.sock:/var/run/docker.sock \
--name dood \
ubuntu:22.04 sleep inf &
@rwcitek
rwcitek / Docker.Python.Compile.md
Last active February 19, 2023 01:37
Compiling Python in a Docker image.

This is a collection of bash commands that builds a Python binary for a specific Linux environment using Docker. Environment variables are used to set default values, e.g. Python version and compile options. Using those environment variables, a HERE-DOC command creates a Dockerfile. Docker then uses the Dockerfile to build the Python binary within a Docker image.

To see what the latest Python version is, visit https://www.python.org/ftp/python/.

set environment variables ( optional )

Only if you want to use something different from the defaults.

@rwcitek
rwcitek / slide-deck.sh
Last active August 7, 2022 20:43 — forked from sluugdemogithub/slide-deck.sh
Creating a new slidedesk repo from the jekyll-and-slide repo
# This gist combines specific commits from two different repos: jekyll-and-slide and reveal.js
# - https://github.com/adamhollett/jekyll-and-slide
# - https://github.com/hakimel/reveal.js
# If there was a way to do this from the browser, this gist would be unnecessary.
# prerequisite: create a blank repo in GitHub and note repo URL
# i.e. no README, no license, completely blank
REMOTE_URL='https://github.com/sluugdemogithub/demo03.git'
# create the URL for GitHub Pages
@rwcitek
rwcitek / chromebook.install.docker.sh
Last active April 17, 2023 04:54
Configure Linux and Install Docker on a Chromebook
# https://dvillalobos.github.io/2020/How-to-install-and-run-Docker-on-a-Chromebook/
export DEBIAN_FRONTEND=noninteractive
sudo apt-get update --allow-releaseinfo-change
sudo apt-get -y install \
apt-transport-https \
ca-certificates \
curl \
@rwcitek
rwcitek / install.ansible.ubuntu.1004.sh
Last active May 18, 2017 08:32
Installing Ansible on Ubuntu 10.04
# from http://docs.ansible.com/intro_installation.html#running-from-source
# as of 2015-02-08
## ansible on Ubuntu 10.04
# become root
sudo su -
# as root ...
apt-get update
apt-get -y install python-pip python-dev git-core make
@rwcitek
rwcitek / deb.pkg.reboot.txt
Created December 19, 2014 23:02
Finding DEB packages that should be held back because they will require a reboot to take effect.
# finding DEB packages that should be held back because they will require a reboot to take effect
# get latest state of packages
apt-get clean && apt-get update && apt-get -dy upgrade
# find those needing reboot
cd /var/cache/apt/archives/ && rm -rf DEBIAN
for i in *.deb ; do
echo == ${i}
dpkg-deb -e ${i}
@rwcitek
rwcitek / rpm.services.list.sh
Last active August 29, 2015 14:11
Generates a list of RPM packages for listening services that may require a restart with an upgrade.
#!/bin/bash
# Generates a list of RPM packages for listening services that may result in services being restarted during a upgrade.
# These probably should not be upgraded automatically in a production environment.
netstat -plntu |
grep -o '[0-9]*/' |
tr -d / |
sort -u |
xargs -r -i stat -c "%N" /proc/{}/exe |
@rwcitek
rwcitek / gitflow.commands.in.video.txt
Last active August 29, 2015 14:11
The commands used to explain git flow in this video: http://vimeo.com/16018419
# the commands used to explain git flow in this video:
# http://vimeo.com/16018419
# pre-reqs:
# apt-get install git git-flow tig tmux
# run tmux in split screen (optional, but is what is done in video)
# in lower screen ... refreshing occasionally
tig