This file contains hidden or 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
add host agekey: | |
sed -i "/keys:/a\ - &{{host}} {{agekey}}" .sops.yaml | |
sed -i "/- age:/a\ - *{{host}}" .sops.yaml | |
update: | |
sops updatekeys yoursecrets.yaml |
This file contains hidden or 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
root@deathstar2:~# cat zpool_create_command | |
zpool create -f -o ashift=9 storage raidz2 /dev/sda /dev/sdb /dev/sdc /dev/sdd raidz2 /dev/sde /dev/sdf /dev/sdg /dev/sdh cache /dev/nvme0n1 log mirror /dev/nvme1n1 /dev/nvme2n1 | |
root@deathstar2:~# lsblk | |
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT | |
sda 8:0 0 931.5G 0 disk | |
├─sda1 8:1 0 931.5G 0 part | |
└─sda9 8:9 0 8M 0 part | |
sdb 8:16 0 931.5G 0 disk | |
├─sdb1 8:17 0 931.5G 0 part | |
└─sdb9 8:25 0 8M 0 part |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
from os import walk, rmdir, remove | |
from os.path import isdir, isfile, getsize | |
nuked = 1 | |
while nuked > 0: | |
nuked = 0 | |
for dirpath, dirnames, filenames in walk('.'): | |
if dirnames == [] and filenames == []: | |
if isdir(dirpath): | |
rmdir(dirpath) |
This file contains hidden or 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
from optparse import OptionParser | |
from getpass import getpass | |
import base64, hmac, hashlib | |
''' | |
This small script is meant to generate long passwords by hashing a secret | |
password and a site identifier. The intent is to create a usable interface | |
for maintaining longer, somewhat more secure (?) passwords. | |
The idea here is that you remember a 'master' password and use it to generate |
This file contains hidden or 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
set bg=dark | |
set expandtab smarttab shiftwidth=4 | |
set softtabstop=4 | |
set backspace=2 | |
colorscheme elflord | |
syntax on |
This file contains hidden or 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
from pyevolve import G1DList | |
from pyevolve import GSimpleGA | |
from pyevolve import Selectors | |
from pyevolve import Mutators | |
from pyevolve import Initializators | |
from pyevolve import GAllele | |
def eval_func(chromosome): | |
score = 0.0 |
This file contains hidden or 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
from django.db import models | |
from django.contrib.admin.models import User | |
from django_extensions.db.models import * | |
class Project(TimeStampedModel, TitleSlugDescriptionModel): | |
""" | |
Project data. | |
""" | |
admins = models.ManyToManyField(User, null=True, related_name='admins_projects') | |
users = models.ManyToManyField(User, null=True, related_name='projects') |
This file contains hidden or 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
import os | |
print "Hello World" | |
os.path.join('/this/is/a', 'test') |