Skip to content

Instantly share code, notes, and snippets.

View the-ress's full-sized avatar

Tereza Tomcova the-ress

  • Prague, Czech Republic
View GitHub Profile
@zsarnett
zsarnett / OctoPrint_Notification.yaml
Last active May 29, 2023 21:47
Send Notification with Camera Snapshot when 3D Printer is Finished
blueprint:
name: Send a camera snapshot when OctoPrint Printer is Finsihed
description: >
This automation blueprint creates a camera snapshot if OctoPrint Status turns off
and sends a notification to your phone with the picture.
domain: automation
input:
printer:
name: 3D Printer
description: The Printer Device to monitor

How to intercept all SSL connections from an Android x86 VM

This guide shows how to setup an Android VM in order to intercept all HTTPS requests. This was originally intended to reverse PlayServices but should work with any app that does not use certificate pinning (i.e. every app that relies on the system certificate authorities).

Inspired by this guide how to install Android x86 in VirtualBox, this guide how to install a system certificate on Android and this guide how to use mitmproxy with VirtualBox.

  1. Download a recent Android x86 ISO from here.

  2. Download a recent Kali Linux VirtualBox Image from here. (You can also use an

@pspill
pspill / maven-fiddler.md
Last active May 11, 2023 14:26
How do I capture Maven's HTTP traffic through Fiddler?
  1. In your Maven settings.xml file located at \conf, add the following XML snippet under the tag. 8888 is the port Fiddler listens to, which can be located in Fiddler under Tools | Options | Connections > in the textbox labeled "Fiddler listens on port".
<proxy>
  <id>Fiddler</id>
  <active>true</active>
  <protocol>https</protocol>
  <host>127.0.0.1</host>
 8888
@the-ress
the-ress / .gitconfig
Last active February 17, 2024 21:16
[push]
default = current
[credential]
helper = manager
[alias]
co = checkout
ci = commit
st = status
br = branch
type = 'cat-file
@start "" "C:\Program Files\TortoiseGit\bin\TortoiseGitProc.exe" /command:%1 /path:. %2 %3 %4 %5 %6 %7 %8 %9
@troyfontaine
troyfontaine / README.md
Last active October 15, 2023 09:58
Ubiquiti USG config.gateway.json Syntax

Ubiquiti USG Advanced Configuration

Overview

Integrated DNS Overview

When using a USG with Ubiquiti's Unifi Controller software (version 5.6 and earlier), the functionality of integrating the hostnames of clients (when they request a DHCP lease) into local DNS does not appear to work as you would find with Consumer grade routers. To work around this limitation, we can add static host mappings to a configuration file that will be provisioned to the USG when either a configuration change is made or we force provisioning to the USG itself.

Non-GUI Supported Dynamic DNS Providers

I've added in the necessary syntax for adding Cloudflare DDNS to the USG for VPN/Services setup courtesy of this post by britannic on the Ubiquiti Forums.

Configuration File

@jaywilliams
jaywilliams / install-mosh.sh
Last active January 3, 2024 17:16 — forked from palexander/gist:2975305
Compiling and running mosh on Dreamhost (Updated - 2024)
#!/usr/bin/env bash
set -e
# Dreamhost Mosh Install Script
# Jay Williams (https://gist.github.com/jaywilliams/c9ffab789b3f622abc932dd4cfaaeef5)
# Based on the gracious work of:
# Paul R Alexander (https://gist.github.com/palexander/2975305)
# Sami Samhuri https://gist.github.com/samsonjs/4076746
@david-risney
david-risney / JavaScriptDataBreakpoint.js
Created June 15, 2016 17:45
JavaScript data breakpoint
function ValueBreakpoint(parent, fullNamePath) {
var name = fullNamePath[0];
var childNamePath = fullNamePath.slice(1);
var innerValue = parent[name];
var childBreakpoints = [];
function applyChildValueBreakpoints() {
if (childNamePath.length > 0 && innerValue) {
childBreakpoints.push(new ValueBreakpoint(innerValue, childNamePath));
}
@teamaton
teamaton / disable-fusion-log.ps1
Last active November 6, 2023 12:53
FusionLog - enable and disable
Remove-ItemProperty -Path HKLM:\Software\Microsoft\Fusion -Name ForceLog
Remove-ItemProperty -Path HKLM:\Software\Microsoft\Fusion -Name LogFailures
Remove-ItemProperty -Path HKLM:\Software\Microsoft\Fusion -Name LogResourceBinds
Remove-ItemProperty -Path HKLM:\Software\Microsoft\Fusion -Name LogPath
@gaearon
gaearon / slim-redux.js
Last active May 5, 2024 15:14
Redux without the sanity checks in a single file. Don't use this, use normal Redux. :-)
function mapValues(obj, fn) {
return Object.keys(obj).reduce((result, key) => {
result[key] = fn(obj[key], key);
return result;
}, {});
}
function pick(obj, fn) {
return Object.keys(obj).reduce((result, key) => {
if (fn(obj[key])) {