Skip to content

Instantly share code, notes, and snippets.

@mweagle
mweagle / pipeline.yml
Created May 25, 2016 14:11
Concourse CI pipeline for http://gosparta.io application build
################################################################################
# REFERENCES
# ConcourseCI Docs: https://concourse.ci
# Concourse tutorial: https://github.com/starkandwayne/concourse-tutorial
#
# NOTES
# This file is a self-contained description of a Concourse CI pipeline
# to deploy a http://gosparta.io application. There's a couple of things to
# note:
# - The YAML uses node references so that scripts can be defined in the
@scottlinux
scottlinux / backblaze b2 backup script
Last active November 6, 2019 23:12
Backup script for backblaze b2
#!/usr/bin/env bash
#
# Backup selected directories to a Backblaze B2 bucket
#
# Example daily cron:
# @daily /usr/local/bin/b2backup >/dev/null
#
# Account creds
id=xxxxxxxxxx
@pgporada
pgporada / centos7_kernel_update.md
Last active December 18, 2021 11:11
Upgrade Kernel on Centos7 via ELRepo
Install the ELRepo and GPG key
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
yum install -y http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
Enable kernel updates from elrepo
yum-config-manager --enable elrepo-kernel
@spalladino
spalladino / mysql-docker.sh
Created December 22, 2015 13:47
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@apolloclark
apolloclark / postgres cheatsheet.md
Last active April 25, 2025 20:57
postgres cheatsheet

Postgres Cheatsheet

This is a collection of the most common commands I run while administering Postgres databases. The variables shown between the open and closed tags, "<" and ">", should be replaced with a name you choose. Postgres has multiple shortcut functions, starting with a forward slash, "". Any SQL command that is not a shortcut, must end with a semicolon, ";". You can use the keyboard UP and DOWN keys to scroll the history of previous commands you've run.

Setup

installation, Ubuntu

http://www.postgresql.org/download/linux/ubuntu/ https://help.ubuntu.com/community/PostgreSQL

@komuw
komuw / create_vpn.sh
Last active November 15, 2023 09:12
create vpn
#https://www.zeitgeist.se/2013/11/22/strongswan-howto-create-your-own-vpn/
#https://www.gypthecat.com/ipsec-vpn-host-to-host-on-ubuntu-14-04-with-strongswan
#Example of simple pre-shared keys vpn setup: https://www.strongswan.org/uml/testresults/ikev2/rw-psk-ipv4/
$ sudo apt-get -y install strongswan
$ ipsec version
Linux strongSwan U5.1.2/K3.13.0-55-generic
Institute for Internet Technologies and Applications
University of Applied Sciences Rapperswil, Switzerland
See 'ipsec --copyright' for copyright information.
@tuxfight3r
tuxfight3r / vim-shortcuts.md
Last active April 22, 2025 06:25
VIM SHORTCUTS

VIM KEYBOARD SHORTCUTS

MOVEMENT

h        -   Move left
j        -   Move down
k        -   Move up
l        -   Move right
$        -   Move to end of line
0        -   Move to beginning of line (including whitespace)
@e7d
e7d / README.md
Last active December 19, 2022 09:13
[Debian] Build a Squid anonymous proxy from source code

If you don't want to build Squid from scratch, you can simply Setup a Squid anonymous proxy

Build a Squid anonymous proxy from source code

Please note that this whole manual refers to the version 3.5.23 of Squid. You probably would have to adapt some commands to the version you will actually download.

Table of contents

@ngpestelos
ngpestelos / remove-docker-containers.md
Last active August 20, 2024 19:34
How to remove unused Docker containers and images

May 8, 2018

I wrote this four years ago, so instead use this command:

$ docker rmi $(docker images -q -f dangling=true)
@mitchwongho
mitchwongho / Docker
Last active April 16, 2025 07:28
Docker 'run' command to start an interactive BaSH session
# Assuming an Ubuntu Docker image
$ docker run -it <image> /bin/bash