For educational reasons I've decided to create my own CA. Here is what I learned.
Lets get some context first.
| ; /usr/local/bin/nasm -f macho 32.asm && ld -macosx_version_min 10.7.0 -o 32 32.o && ./32 | |
| global start | |
| section .text | |
| start: | |
| push dword msg.len | |
| push dword msg | |
| push dword 1 | |
| mov eax, 4 |
| -- This AppleScript converts the clipboard contents to plain text | |
| set the clipboard to (get the clipboard as text) | |
| -- Show notification with a preview | |
| display notification (the clipboard) with title ("PlainTexted!") | |
| -- Add a small delay so the notification has the time to launch | |
| delay 2 |
| #!/usr/bin/python | |
| import serial | |
| import signal | |
| import sys | |
| import time | |
| def BinaryModeEnter(connection): | |
| connection.flushInput() | |
| for x in range(0, 20): # Try at most 20 times |
cloud-init is absolute cancer. Its code is horrible. It has no documentation at all.
It took me 5 fucking hours to figure out how to properly configure networking on recent
cloud-init (Ubuntu 16.04 cloud image) with local datasource.
It's not mentioned anywhere you need to provide dsmode: local. (but only if you need network-config,
besides that everything is fine; someone below noted that -m flag does the same thing, good to know) Of course nobody needs documentation for network-config format
either. (cloudinit/net/__init__.py is a protip, enjoy the feces dive)
Oh, and by the way - no, it's not possible to provide network-config to uvt-kvm without patching shit.
| // A sketch for a DigiSpark USB device that detects when a door is opened | |
| // The door should have a reed switch with NC (normally closed) connected to the Vin wire of the device | |
| // When the door is opened, the reed switch is closed and the device is started | |
| // A 32-nit message is then sent via a 433 MHz signal that can be picked up by an appropriate receiver | |
| // (a Raspberry Pi in my case). | |
| // When the door is closed, the reed switch is opened and the device is shut down | |
| // | |
| // Depends on the RCSwitch library https://github.com/sui77/rc-switch | |
| // and the eeprom-library | |
| // |
| # import config. | |
| # You can change the default config with `make cnf="config_special.env" build` | |
| cnf ?= config.env | |
| include $(cnf) | |
| export $(shell sed 's/=.*//' $(cnf)) | |
| # import deploy config | |
| # You can change the default deploy config with `make cnf="deploy_special.env" release` | |
| dpl ?= deploy.env | |
| include $(dpl) |
| #! /usr/bin/env python | |
| # Copyright (C) 2012 The Android Open Source Project | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # |
| --Adapted from http://apple.stackexchange.com/questions/194567/how-can-i-use-applescript-to-type | |
| --Types text in where TypeIt4Me dare not tread (like in a VNC session). | |
| on run {input, parameters} | |
| tell application "System Events" | |
| set textToType to the clipboard | |
| delay 1 | |
| keystroke textToType | |
| end tell |