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
# /etc/systemd/system/update.timer | |
[Unit] | |
Description=Perform a full upgrade once a week (at 12:00pm on Monday) | |
[Timer] | |
OnCalendar=Mon *-*-* 12:00:00 | |
Persistent=true | |
[Install] | |
WantedBy=timers.target |
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/python | |
import requests | |
def get_quote(): | |
return requests.get("https://breaking-bad-quotes.herokuapp.com/v1/quotes").json()[0] | |
def format_quote(q): | |
author = q.get("author") | |
quote = q.get("quote") | |
return f"'{quote}' - {author}" |
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
PACKER_LOG=1 packer validate build.json | |
2019/08/06 14:17:59 [INFO] Packer version: 1.4.2 | |
2019/08/06 14:17:59 Packer Target OS/Arch: linux amd64 | |
2019/08/06 14:17:59 Built with Go Version: go1.12.7 | |
2019/08/06 14:17:59 Detected home directory from env var: /home/mathieu | |
2019/08/06 14:17:59 Using internal plugin for amazon-chroot | |
2019/08/06 14:17:59 Using internal plugin for azure-arm | |
2019/08/06 14:17:59 Using internal plugin for alicloud-ecs | |
2019/08/06 14:17:59 Using internal plugin for lxc | |
2019/08/06 14:17:59 Using internal plugin for parallels-iso |
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
$ cat > connect.asm << EOF | |
SECTION .text | |
global _start | |
_start: | |
xor rax, rax ; init 0 | |
xor rdx, rdx ; init 0 | |
xor rsi, rsi ; init 0 |
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
import sys | |
import string | |
import random | |
# return a key of the size | |
# of the PT | |
def generate_key(length): | |
r = lambda: \ | |
string.ascii_letters[int(random.random() * len(string.ascii_letters))] | |
key = b'' |
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
import tkinter | |
class Test(tkinter.Frame): | |
def __init__(self, parent): | |
tkinter.Frame.__init__(self, parent) | |
# create entry class attribute | |
self.entry = tkinter.Entry(self) | |
self.entry.grid(row=0, column=1) |
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
package main | |
import ( | |
"bufio" | |
"bytes" | |
"encoding/binary" | |
"fmt" | |
"net" | |
"os" | |
"time" |
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
{"format_version":"0.1","terraform_version":"0.13.5","planned_values":{"root_module":{"child_modules":[{"resources":[{"address":"module.k8s.data.ignition_config.ignition[0]","mode":"data","type":"ignition_config","name":"ignition","index":0,"provider_name":"registry.terraform.io/terraform-providers/ignition","schema_version":0,"values":{"append":[],"arrays":null,"directories":null,"disks":null,"files":["{\"filesystem\":\"root\",\"group\":{},\"path\":\"/etc/hostname\",\"user\":{},\"contents\":{\"source\":\"data:text/plain;charset=utf-8;base64,bm9kZS0wMA==\",\"verification\":{}},\"mode\":420}"],"filesystems":null,"groups":null,"links":null,"networkd":["{\"contents\":\"[Match]\\nName=eth0\\n\\n[Network]\\nDHCP=ipv4\\n\",\"name\":\"00-wired.network\"}"],"replace":[],"systemd":[null,"{\"contents\":\"[Unit]\\nDescription=Setup Network Environment\\nDocumentation=https://github.com/kelseyhightower/setup-network-environment\\nRequires=network-online.target\\nAfter=network-online.target\\n\\n[Service]\\nExecStartPre=- |
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
import json | |
import sys | |
if len(sys.argv) < 3: | |
print(f"usage: {sys.argv[0]} resources.tfstate resources12.tfstate") | |
exit(1) | |
source = sys.argv[1] | |
dest = sys.argv[2] |
OlderNewer