Skip to content

Instantly share code, notes, and snippets.

@eacmen
eacmen / tplink-unauth-exploit.py
Created July 20, 2018 01:49
TP-LINK WL-WA850RE POC Unauthenticated Exploit
@acarril
acarril / bootable-win-on-mac.md
Created November 18, 2022 17:49
Create a bootable Windows USB using macOS

For some reason, it is surprisingly hard to create a bootable Windows USB using macOS. These are my steps for doing so, which have worked for me in macOS Monterey (12.6.1) for Windows 10 and 11. After following these steps, you should have a bootable Windows USB drive.

1. Download a Windows disc image (i.e. ISO file)

You can download Windows 10 or Windows 11 directly from Microsoft.

2. Identify your USB drive

After plugging the drive to your machine, identify the name of the USB device using diskutil list, which should return an output like the one below. In my case, the correct disk name is disk2.

@azagniotov
azagniotov / beautiful.rest.api.docs.in.markdown.md
Last active May 4, 2024 11:01
Example to create beautiful REST API docs in Markdown, inspired by Swagger API docs.
[
{
"key": "h",
"command": "editor.action.scrollLeftHover",
"when": "editorHoverFocused"
},
{
"key": "j",
"command": "editor.action.scrollDownHover",
"when": "editorHoverFocused"
{
"vim.smartRelativeLine": true,
"editor.cursorSurroundingLines": 8,
"editor.wordSeparators": "`~!@#$%^&*()=+[{]}\\|;:'\",.<>/?",
"vim.normalModeKeyBindings": [
{
"before": ["<leader>", "e"],
"commands": ["workbench.view.explorer"]
},
{
@yedehrab
yedehrab / Temel-Git-Komutlari.md
Created October 23, 2018 14:37
Temel Github Komutları

Temel Git Komutları

Git deposunu başlatma

Yeni git için

git init
@wandyme
wandyme / uninstall-ni-drivers
Created May 4, 2024 10:58 — forked from jpgill86/uninstall-ni-drivers
Cleanly uninstall National Instruments data acquisition drivers on Mac
#!/bin/bash
# UNINSTALL NATIONAL INSTRUMENTS DRIVERS 3.5.0f1, 3.6.0, 3.7.0, 14.0.0, 15.0.0
# https://gist.github.com/jpgill86/2342ee23241120de41e505194e7de178
#
# This script was created from the lists of files in several Uninstall.txt files
#
# NI-DAQmx Base 3.5.0f1, 3.6.0, 3.7.0, 14.0.0, 15.0.0
# /Applications/National Instruments/NI-DAQmx Base/Uninstall.txt
#
@tuxity
tuxity / navicat_premium_reset_trial.sh
Last active May 4, 2024 10:57
Reset Navicat Premium 15/16 remaining trial days
#!/bin/bash
set -e
file=$(defaults read /Applications/Navicat\ Premium.app/Contents/Info.plist)
regex="CFBundleShortVersionString = \"([^\.]+)"
[[ $file =~ $regex ]]
version=${BASH_REMATCH[1]}
@sleepdefic1t
sleepdefic1t / MACOS_CLANG_TIDY.md
Last active May 4, 2024 10:54
brew clang-tidy on macOS
brew install llvm
ln -s "/usr/local/opt/llvm/bin/clang-format" "/usr/local/bin/clang-format"
ln -s "/usr/local/opt/llvm/bin/clang-tidy" "/usr/local/bin/clang-tidy"

use cmake file

  find_program(CLANG_TIDY_BIN clang-tidy)
 find_program(RUN_CLANG_TIDY_BIN /usr/local/Cellar/llvm/10.0.0_3/share/clang/run-clang-tidy.py)
@MartinNowak
MartinNowak / convert_saved_model.py
Created November 28, 2019 16:17
Convert TF saved model from protobuf binary to text format
import os, sys
import google.protobuf
from tensorflow.core.protobuf import saved_model_pb2
import tensorflow as tf
def convert_saved_model_to_pbtxt(path):
saved_model = saved_model_pb2.SavedModel()
with open(os.path.join(path, 'saved_model.pb'), 'rb') as f: