- Enable proper repositories:
subscription-manager repos --disable="*" \
--enable=rhel-7-server-rpms \
--enable=rhel-7-server-extras-rpms
| # requires ghostscript to be installed first - on mac, install with `brew install ghostscript` | |
| # -sDEVICE=txtwrite - text writer | |
| # -sOutputFile=- - use stdout instead of a file | |
| # -q - quiet - prevent writing normal messages to output | |
| # -dNOPAUSE - disable prompt and pause at end of each page | |
| # -dBATCH - indicates batch operation so exits at end of processing | |
| gs -sDEVICE=txtwrite -sOutputFile=- -q -dNOPAUSE -dBATCH to-be-processed.pdf |
Add kiosk.js file with the content below to your www folder in config.
Like any other custom script, use ui-lovelace.yaml resources section to reference the kiosk.js file.
Make sure you add kiosk somewhere in your URL. You can use it in the id of your view or in the query string.
| const cheerio = require('cheerio') | |
| const responseBody = "<?xml version='1.0' encoding='us-ascii'?> \ | |
| <!-- A SAMPLE set of slides --> \ | |
| <soap-env:envelope> \ | |
| <soap-env:header> \ | |
| <wsse:security xmlns:wsse=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\">Assertion Here</wsse:security> \ | |
| </soap-env:header> \ | |
| <soap-env:body> \ | |
| <slideshow \ |
| import boto3 | |
| from botocore.vendored import requests | |
| from botocore.exceptions import ClientError | |
| import json | |
| import random | |
| import string | |
| import os | |
| import logging | |
| #!/bin/sh | |
| # This script configures a meraki ms220-8p switch completely from scratch | |
| # See https://leo.leung.xyz/wiki/Meraki_MS220-8P for rooting instructions | |
| # You can keep config and config.local completely empty, but i'd recommend to add a configuration | |
| # which isolates all ports from each other. | |
| # Without that you might have switching loops on bootup (unlikely since STP keeps longer to initialize | |
| # than it takes this script to take over, but it just feels cleaner). |
Here's one of my favorite techniques for lateral movement: SSH agent forwarding. Use a UNIX-domain socket to advance your presence on the network. No need for passwords or keys.
root@bastion:~# find /tmp/ssh-* -type s
/tmp/ssh-srQ6Q5UpOL/agent.1460
root@bastion:~# SSH_AUTH_SOCK=/tmp/ssh-srQ6Q5UpOL/agent.1460 ssh [email protected]
user@internal:~$ hostname -f
internal.company.tldI want Microsoft to do better, want Windows to be a decent development platform-and yet, I constantly see Microsoft playing the open source game: advertising how open-source and developer friendly they are - only to crush developers under the heel of the corporate behemoth's boot.
The people who work at Microsoft are amazing, kind, talented individuals. This is aimed at the company's leadership, who I feel has on many occassions crushed myself and other developers under. It's a plea for help.
You probably haven't heard of it before, but if you've ever used win32 API bindings in C#, C++, Rust, or other languages, odds are they were generated from a repository called microsoft/win32metadata.