Skip to content

Instantly share code, notes, and snippets.

@swettk
swettk / README.md
Created August 9, 2021 21:07 — forked from pamolloy/README.md
Mesh network using VXLAN over Wireguard
@swettk
swettk / podcastgen.py
Created December 29, 2020 04:29 — forked from alghanmi/podcastgen.py
Podcast Feed Generator -- Generate an podcast RSS feed for a set of media in a directory.
"""Podcast Feed Generator
Generate an podcast RSS feed for a set of media in a directory.
Use the list-extensions argument to see the list of supported extensions. You can add custom extensions using
Usage:
podcastgen.py gen <directory> --title=<podcast-title> --link=<podcast-link> --desc=<description> [--output=<rss-feed-file>] [--feed-link=<feed-url>] [--id=<podcast-id>] [--logo=<image_file>] [--category=<itunes-category> [--subcategory=<itunes-category>]] [--language=<language>] [--use-extension=<ext>]
podcastgen.py list-categories
podcastgen.py list-extensions
podcastgen.py -h | --help
@swettk
swettk / docker-on-android.md
Created June 24, 2020 23:06 — forked from arno01/docker-on-android.md
Docker on Android

WORK IN PROGRESS

Docker on Android

Setup:

Samsung Galaxy Tab S5e SM-T720
Android Pie on Linux 4.9.112 (not rooted)
Termux
@swettk
swettk / zbell.sh
Created December 7, 2016 19:06 — forked from jpouellet/zbell.sh
Makes Zsh print a bell when long-running commands finish. I use this in combination with i3 and throw big compile jobs (or whatever it may be) into another workspace to get a nice visual notification (workspace indicator turns red) when it's done so I don't need to waste time regularly checking on it.
#!/usr/bin/env zsh
# This script prints a bell character when a command finishes
# if it has been running for longer than $zbell_duration seconds.
# If there are programs that you know run long that you don't
# want to bell after, then add them to $zbell_ignore.
#
# This script uses only zsh builtins so its fast, there's no needless
# forking, and its only dependency is zsh and its standard modules
#
@swettk
swettk / lxc-default-with-netns
Created March 23, 2016 07:35 — forked from jjo/lxc-default-with-netns
apparmor profile to allow netns handling inside LXCs
# /etc/apparmor.d/lxc/lxc-default-with-netns
# Do not load this file. Rather, load /etc/apparmor.d/lxc-containers, which
# will source all profiles under /etc/apparmor.d/lxc
profile lxc-container-default-with-netns flags=(attach_disconnected,mediate_deleted) {
#include <abstractions/lxc/container-base>
#include <abstractions/lxc/start-container>
# - onetime mount, if /run/netns was not mounted yet:
@swettk
swettk / zbell.zsh
Created January 2, 2016 08:52 — forked from oknowton/zbell.zsh
#!/usr/bin/env zsh
# This script prints a bell character when a command finishes
# if it has been running for longer than $zbell_duration seconds.
# If there are programs that you know run long that you don't
# want to bell after, then add them to $zbell_ignore.
#
# This script uses only zsh builtins so its fast, there's no needless
# forking, and its only dependency is zsh and its standard modules
#
@swettk
swettk / provision.sh
Created December 21, 2015 19:12 — forked from badsyntax/provision.sh
Running lxc with zfs backing store, in Ubuntu 14.04, within a virtualbox virtual machine
#!/usr/bin/env bash
# ubuntu/trusty64
apt-get update
apt-get install software-properties-common -y
apt-add-repository ppa:ubuntu-lxc/daily
add-apt-repository ppa:zfs-native/stable
add-apt-repository ppa:nginx/stable -y
@swettk
swettk / get-api-token-of-user-jenkins-groovy.md
Created December 8, 2015 23:18
jenkins groovy get API token of a user

This is pretty simple snippet to get API Token of a user , lets say "MYUser" in jenkins.
its pretty useful when you are working with 'jenkins-job-builder' to update jobs in jenkins, and you need to get the api token which JJB needs inorder to update jobs to ..
run this code in either jenkins script console , or as i prefer, in form of init.groovy.
so when jenkins amster starts, i create a user for JJb.
after that i get the token right away and pass it to my JJB jobs folder to file 'jenkins_jobs.ini' :)_ .

///////////////////////////////////////////////////////////////////////
@swettk
swettk / howto.md
Created November 19, 2015 15:26 — forked from rmoriz/howto.md
Build an OSX 10.10 base-box for test-kitchen and VirtualBox