This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
env PROMETHEUS=/usr/bin/prometheus | |
env CONFIG=/etc/prometheus/prometheus.yml | |
env USER=prometheus | |
env GROUP=prometheus | |
env DEFAULTS=/etc/default/prometheus | |
env RUNDIR=/var/run/prometheus | |
env PID_FILE=/var/run/prometheus/prometheus.pid | |
pre-start script | |
[ -e $DEFAULTS ] && . $DEFAULTS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Create lxc profile that allows using snaps in the container | |
NAME=snap | |
lxc profile create $NAME &> /dev/null || true | |
cat << EOF | lxc profile edit $NAME | |
name: $NAME | |
description: Set up snaposity | |
config: | |
security.nesting: "true" | |
user.vendor-data: | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import pygame | |
from random import randint, choice | |
def main(): | |
pygame.init() | |
screen = pygame.display.set_mode((0, 0), pygame.FULLSCREEN) | |
info = pygame.display.Info() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/build/build.sh b/build/build.sh | |
index 485c6ca..df82658 100755 | |
--- a/build/build.sh | |
+++ b/build/build.sh | |
@@ -45,6 +45,8 @@ export GOARCH="${ARCH}" | |
( | |
cd client | |
npm install --loglevel=error | |
+ chmod 755 ./node_modules/webpack/bin/webpack.js | |
+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://discuss.linuxcontainers.org/t/lxd-netplan-static-ips-in-same-subnet-how-to/1074/7 | |
$ lxc profile show lan | |
config: {} | |
description: "" | |
devices: | |
br0: | |
nictype: bridged | |
parent: br0 | |
type: nic |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# snippet for .ssh/config | |
Host *.lxd | |
#User ubuntu | |
#StrictHostKeyChecking no | |
#UserKnownHostsFile /dev/null | |
ProxyCommand nc $(lxc list --format csv -c s4 $(echo %h | sed "s/\.lxd//g") %h | python3 -c "import csv,sys; print([ip for ip in [e.split('\n') for s,e in list(csv.reader(sys.stdin)) if s == 'RUNNING'][0] if | |
'eth' in ip][0].split(' ')[0])") %p |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import re | |
import timeit | |
def toomanyinarow1(term, maxreps): | |
cnt = 1 | |
prev = None | |
for char in term: | |
if char == prev: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env fades | |
from pprint import pprint | |
from urllib.parse import urlencode | |
from oauthlib import oauth1 # fades | |
# client_key is the openid_identifier from the account | |
# client_secret is the oauth_secret from the account | |
# resource_owner_key is the key from the token in account.token_set.create | |
# resource_owner_secret is the secret from the above | |
# timestamp and nonce should be the fixed values noted in the existing test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Small format (no 4k monstrosities thanks): | |
youtube-dl -f "[height <= 1024]" -a bru.txt | |
Good quality: | |
youtube-dl -f "bestvideo+bestaudio[ext=m4a]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
CRT_BRANCH=/src/click-reviewers-tools/review-tools # git branch | |
SCA_BRANCHES=/src/software-center-agent | |
WANTED_RELEASE=$1 | |
NEW_BRANCH=sca-crt-$WANTED_RELEASE | |
if [ -z $WANTED_RELEASE ]; then | |
echo "Didn't indicate a wanted release" | |
exit 1 | |
fi |