Skip to content

Instantly share code, notes, and snippets.

@nikolay-n
nikolay-n / defsmon.py
Last active October 29, 2022 14:26
Defaults Monitor - tool to sniff defaults keys and values using unified log
#!/usr/bin/python2.7
# -*- coding: utf-8 -*-
'''
Defaults Monitor - tool to sniff defaults keys and values using unified log
to launch use standard python 2.7, eg python2.7 ./defsmon.py
'''
import os
@Sillium
Sillium / TelekomDataUsage.js
Last active March 1, 2023 13:41
Telekom Data Usage - iOS 14 Widget for Scriptable app
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: pink; icon-glyph: exchange-alt;
const DEBUG = false
const log = DEBUG ? console.log.bind(console) : function () { };
// configure the library
const libraryInfo = {
name: 'TelekomDataUsageLibrary',
version: '1.0.3',
@singledigit
singledigit / RequestTemplate-vtl.json
Last active November 6, 2020 18:50
Example of using VTL on Amazon API Gateway to insert an epoch time into Amazon DynamoDB to be used as a TTL field
## This examples converts the millisecond epoch of API Gateway
## to the seconds epoch of DynamoDB and adds 5 minutes for the TTL.
#set( $epoch = $context.requestTimeEpoch / 1000 + 300 )
{
"TableName":"Epoch",
"Item":{
"id":{"S":"$context.requestId"},
"ttlTime":{"N":"$epoch"}
}
@geek-at
geek-at / trash.sh
Created August 13, 2020 07:27
The script used to trash a banking phishing site
#!/bin/bash
while :; do
verf=$(cat /dev/urandom | tr -dc '0-9' | fold -w 8 | head -n 1)
pin=$(cat /dev/urandom | tr -dc '0-9' | fold -w 5 | head -n 1)
ip=$(printf "%d.%d.%d.%d\n" "$((RANDOM % 256))" "$((RANDOM % 256))" "$((RANDOM % 256))" "$((RANDOM % 256))")
@ismailyenigul
ismailyenigul / swaks-aws-ses.md
Created July 8, 2020 15:47
swaks AWS SES Test email

install swaks

apt install -y swaks

send test message

swaks  --from sender@domain.com --to rcptuser@domain.com --auth-user myuser --auth-password "mypass"  --server  email-smtp.eu-west-1.amazonaws.com  --tlsc

Options

@gaearon
gaearon / Classes.js
Created May 27, 2020 17:38
Beneath Classes: Prototypes
class Spiderman {
lookOut() {
alert('My Spider-Sense is tingling.');
}
}
let miles = new Spiderman();
miles.lookOut();
#!/bin/sh
# Usage:
#
# - Install jq: https://stedolan.github.io/jq/
# - Add this script to your path, eg. to /usr/local/bin
# - Add AWS access key id and secret access key to LastPass
# named "AWS Credentials for my-profile profile"
# - Add "credential_process = awscreds-lpass my-profile" to
# the respective profile in ~/.aws/config
@tomhicks
tomhicks / plink-plonk.js
Last active March 18, 2024 02:23
Listen to your web pages
@caseywatts
caseywatts / 0-self-publishing.md
Last active May 2, 2024 06:04
Self-Publishing via Markdown
@talkingmoose
talkingmoose / Manage App Notifications.bash
Last active January 25, 2024 15:26
macOS Catalina will prompt users to allow Notifications from each app that makes a request. Administrators can manage these prompts using a Configuration Profile. If running Jamf Pro 10.19 or later, I suggest instead using this manifest: https://github.com/talkingmoose/jamf-manifests/blob/master/macOS%20Notifications%20(com.apple.notificationset…
#!/bin/bash
<<ABOUT_THIS_SCRIPT
-----------------------------------------------------------------------
Written by:William Smith
Professional Services Engineer
Jamf
bill@talkingmoose.net
https://gist.github.com/talkingmoose/9faf50deaaefafa9a147e48ba39bb4b0