A systemd service to activate postgresql only when you need it
requires: Postgresql and Systemd
- create
postgresql.socketinto/usr/lib/systemd/system - run
sudo systemctl enable postgresql.socketto enable the socket service
| #include <iostream> | |
| #include <string> | |
| using namespace std; | |
| //defines | |
| #define tablehieght 3 | |
| #define tablewidth 3 | |
| #define player1 -32 |
| <?xml version="1.0" encoding="UTF-8" ?> | |
| <xml> | |
| <ver>1.0.0.0</ver> | |
| <app>Updater</app> | |
| <loc>NULL</loc> | |
| </xml> |
| import random | |
| #Edit for player list | |
| players = [ "Lukos", "david", "elf_and_safety", "jack" , "sefirosu" , "supa_kappa" , "Nantres", "orange_lightning" ] | |
| #Hardcode people to be in a team like so: | |
| dire = ["Blake"] | |
| rad = ["Daniel"] | |
| #debug | |
| #print (len(dire) , len(rad)) |
| #!/usr/bin/python3 | |
| def main(): | |
| print (decode(encode("101" , "1011"))) | |
| print (decode(encode("1101" , "1011"))) | |
| print (decode(encode("10010101" , "1011"))) | |
| # Reads read the source C | |
| # Decodes by getting the 1st 2 bits from the string | |
| # 1st bit (from left) is the End of String bit |
| #!/usr/bin/env python3 | |
| # | |
| # Requires Python 3, and requests | |
| # | |
| # Tested on Linux, python 3.4, requests 2.6.0 | |
| # | |
| import requests | |
| import json, time, datetime, re |
| #!/bin/bash | |
| # | |
| # Modified TMUX start script from: | |
| # http://forums.gentoo.org/viewtopic-t-836006-start-0.html | |
| # | |
| # Store it to `~/bin/tmx` and issue `chmod +x`. | |
| # | |
| # Works because bash automatically trims by assigning to variables and by |
| if (( SHLVL > 1 )); then | |
| return 1 | |
| fi | |
| export RUST_SRC_PATH=~/.local/share/rustup/toolchains/<triple for sys>/lib/rustlib/src/rust/src | |
| export CARGO_HOME=~/.local/share/cargo | |
| export RUSTUP_HOME=~/.local/share/rustup |
| #!/bin/sh | |
| cargo install --list | grep ':$' | sed 's/\(^.*\)\s.*/\1/' | xargs -t -I _ cargo install _ | |
| # install script into $PATH | |
| # use via `cargo binupdate` | |
| # also accepts `cargo binupdate --force` |
| FROM python:3.8-alpine | |
| RUN apk add --no-cache --virtual builddeps gcc musl-dev && \ | |
| pip --no-cache-dir install aws-sam-cli && \ | |
| apk del builddeps |