Skip to content

Instantly share code, notes, and snippets.

View ankon's full-sized avatar

Andreas Kohn ankon

View GitHub Profile
@robonxt
robonxt / Installing the Pebble app on iOS with Sideloadly.md
Last active November 6, 2024 21:32
Installing the Pebble app on iOS with Sideloadly - Rebble (Now)Official Installation Guide by robonxt

NOTICE:

Rebble have an official official guide based on this, so please follow their guide on their website at help.rebble.io/sideload-ios-app.

Please direct your questions and suggestions to the helpful people in the official Rebble Discord Server

This guide is in maintenance mode. I am only keeping this guide up as a archive and for those who stumble upon it through old links.

Thank you for all the support, and long live Pebble and Rebble!

@mikaelhg
mikaelhg / README.md
Created July 10, 2020 13:40
Using Packer to provision Amazon Linux 2 without seed.iso

(I also reported this to AWS: awsdocs/amazon-ec2-user-guide#123)

The "Running Amazon Linux 2 as a virtual machine onpremises" page describes a fairly cumbersome way of running Amazon Linux 2 in local virtual machines through using various tools to provision ISO9660 seed.iso files just to serve the VM instance two small data files.

It would be great it the documentation also pointed out that since the VM provisioning is being done with cloud-init, and the image has configured a fairly extensive datasource_list: [ NoCloud, AltCloud, ConfigDrive, OVF, None ] which starts with NoCloud, that NoCloud also allows you to serve these files over HTTP.

There are two easy ways of using network configuration instead of seed.iso. Either you tell GRUB to add a parameter to the kernel boot configuration, or you tell KVM/VMWare/Virtualbox to set the virtual machine's SMBIOS value to something which cloud-init's NoCloud understands.

The documentation page https://cloudinit.readthedocs.

@zachboyd
zachboyd / AWSSubscriptionClient.ts
Last active September 22, 2022 15:09
Appsync Subscription support for subscriptions-transport-ws
import { uniqBy } from 'lodash';
import { ClientOptions, SubscriptionClient } from 'subscriptions-transport-ws';
export class AWSSubscriptionClient extends SubscriptionClient {
constructor(
url: string,
options?: ClientOptions,
webSocketImpl?: any,
webSocketProtocols?: string | string[]
) {
@prumand
prumand / prepend-empty-lines.js
Created February 28, 2020 11:54
Prepend empty lines to existing source-map
#!/usr/bin/env node
const sourceMap = require('source-map')
const fs = require('fs')
const path = require('path')
/**
* Prepend six lines to source-map
*/
const runSourceMapPrepend = async (sourceMapFile) => {
const sourceMapFileContent = fs.readFileSync(sourceMapFile, 'utf8')
@mhofman
mhofman / MacOS Screen sharing on localhost only.md
Last active January 5, 2025 00:29
MacOS ScreenSharing on localhost only

Force recent MacOS to listen for screen sharing on localhost only, keeping SIP on

All the following has been validated on MacOS Mojave 10.14.6

Problems

While there is a command line preference to accept only local VNC connections, that setting still doesn't prevent the daemon from listening to the wildcard address, and advertise the service on Bonjour. I haven't actually tried to see if it restricted anything in modern versions of the operating system, but here it is for reference:

sudo defaults write /Library/Preferences/com.apple.RemoteManagement.plist VNCOnlyLocalConnections -bool yes
@mgeeky
mgeeky / xml-attacks.md
Last active May 2, 2025 19:06
XML Vulnerabilities and Attacks cheatsheet

XML Vulnerabilities

XML processing modules may be not secure against maliciously constructed data. An attacker could abuse XML features to carry out denial of service attacks, access logical files, generate network connections to other machines, or circumvent firewalls.

The penetration tester running XML tests against application will have to determine which XML parser is in use, and then to what kinds of below listed attacks that parser will be vulnerable.


@DavidDeCoding
DavidDeCoding / AwsKinesisRecordsViewer.md
Created July 19, 2017 14:38
Aws Kinesis Records Viewer

The process to view records in kinesis are as follows:

  1. Get a shard iterator:
aws kinesis get-shard-iterator --shard-id shardId-000000000000 --shard-iterator-type LATEST --stream-name
  1. Run your producer using kpl or anyother library and language.

  2. Read records of the recently created shard iterator:

@HyperBrain
HyperBrain / lifecycle-cheat-sheet.md
Last active March 14, 2025 05:30
Serverless Lifecycle Cheat Sheet

Serverless plugin author's cheat sheet

This cheat sheet provides a detailed overview of the exposed lifecycle events and available commands (and entrypoints) of the Serverless framework, that can be hooked by plugins (internal and external ones). The document is structured by the commands invoked by the user.

Lifecycle events are shown as the globally available outer events (all providers) and sub lifecycle events that are provider specific in the called order. Currently only the AWS provider is shown. If you have information about the other provider,

@hediet
hediet / main.md
Last active April 7, 2025 18:00
Proof that TypeScript's Type System is Turing Complete
type StringBool = "true"|"false";


interface AnyNumber { prev?: any, isZero: StringBool };
interface PositiveNumber { prev: any, isZero: "false" };

type IsZero<TNumber extends AnyNumber> = TNumber["isZero"];
type Next<TNumber extends AnyNumber> = { prev: TNumber, isZero: "false" };
type Prev<TNumber extends PositiveNumber> = TNumber["prev"];
@BretFisher
BretFisher / docker-for-mac.md
Last active March 31, 2025 10:12
Getting a Shell in the Docker Desktop Mac VM

2021 Update: Easiest option is Justin's repo and image

Just run this from your Mac terminal and it'll drop you in a container with full permissions on the Docker VM. This also works for Docker for Windows for getting in Moby Linux VM (doesn't work for Windows Containers).

docker run -it --rm --privileged --pid=host justincormack/nsenter1

more info: https://github.com/justincormack/nsenter1