I'm writing this up from memory, so errors may appear.
This has been updated to use SHA256 certificates.
- Go to http://www.startssl.com/
- Click on 'Control Panel'
| #!/usr/bin/python | |
| """Print a swatch using all 256 colors of 256-color-capable terminals.""" | |
| __author__ = "Marius Gedminas <marius@gedmin.as>" | |
| __url__ = "https://gist.github.com/mgedmin/2762225" | |
| __version__ = '2.0' | |
| def hrun(start, width, padding=0): |
| # This is how you add a Jenkins slave | |
| # On master: | |
| sudo -u jenkins -H ssh-keygen | |
| # On slave | |
| adduser --system --group --home=/var/lib/jenkins-slave --no-create-home --disabled-password --quiet --shell /bin/bash jenkins-slave | |
| install -d -o jenkins-slave -g jenkins-slave /var/lib/jenkins-slave |
| import argparse | |
| import pathlib | |
| import sys | |
| old_bytes = bytes([0x80, 0x79, 0x05, 0x00, 0x0f, 0x94, 0xc2]) | |
| new_bytes = bytes([0xc6, 0x41, 0x05, 0x01, 0xb2, 0x00, 0x90]) | |
| def main(): | |
| parser = argparse.ArgumentParser(description="sublime text patcher") |
| # filter_plugins/dns.py | |
| import dns.zone # pip install dnspython or pipx inject ansible dnspython | |
| import dns.resolver | |
| import dns.flags | |
| def get_dns_serial(zone, ns=None): | |
| resolver = dns.resolver.Resolver(configure=True) | |
| resolver.use_edns(0, ednsflags=dns.flags.DO, payload=4096) | |
| if ns: |
| #!/usr/bin/python | |
| import spwd | |
| import subprocess | |
| DOCUMENTATION = ''' | |
| --- | |
| module: lock_user | |
| short_description: locks user accounts | |
| description: | |
| - The M(lock_user) module invokes C(passwd -l) to lock user accounts. |
| #!/usr/bin/env python3 | |
| # See http://stackoverflow.com/questions/3581031/backup-mirror-github-repositories/13917251#13917251 | |
| # You can find the latest version of this script at | |
| # https://gist.github.com/4319265 | |
| import os | |
| import sys | |
| import json | |
| import urllib.request | |
| import subprocess |
| fun! ToggleTerminal() | |
| let terms = term_list() | |
| if terms == [] " no terminals, open one | |
| botright term | |
| elseif bufwinnr(terms[0]) == -1 " terminal hidden, show it | |
| exec 'botright sbuffer' terms[0] | |
| else " terminal visible, hide it | |
| exec bufwinnr(terms[0]) .. 'hide' | |
| endif | |
| endf |
| #!/usr/bin/python | |
| import subprocess | |
| DOCUMENTATION = ''' | |
| --- | |
| module: postfix | |
| short_description: changes postfix configuration parameters | |
| description: | |
| - The M(postfix) module changes postfix configuration by invoking 'postconf'. |
I'm writing this up from memory, so errors may appear.
This has been updated to use SHA256 certificates.
| use num_integer::lcm; | |
| use std::cmp::Ordering; | |
| use std::collections::{BinaryHeap, HashMap}; | |
| #[derive(Copy, Clone)] | |
| pub struct Pos { | |
| x: usize, | |
| y: usize, | |
| } |