how to assemble and link:
nasm -f elf32 -o <filename>.o <filename>.asm
ld -m elf_i386 -o <filename> <filename>.o
template code (hello world):
section .text
global _start
#!/bin/sh | |
echo Disabling vpnagentd... | |
sudo launchctl disable system/com.cisco.anyconnect.vpnagentd | |
echo Tearing down vpnagentd... | |
sudo launchctl bootout system /Library/LaunchDaemons/com.cisco.anyconnect.vpnagentd.plist | |
echo Deactivating Cisco AnyConnect Socket Filter Extension... | |
/Applications/Cisco/Cisco\ AnyConnect\ Socket\ Filter.app/Contents/MacOS/Cisco\ AnyConnect\ Socket\ Filter -deactivateExt |
#!/bin/zsh | |
# WARNING! The script is meant to show how and what can be disabled. Don’t use it as it is, adapt it to your needs. | |
# Credit: Original idea and script disable.sh by pwnsdx https://gist.github.com/pwnsdx/d87b034c4c0210b988040ad2f85a68d3 | |
# Disabling unwanted services on macOS Big Sur (11), macOS Monterey (12), macOS Ventura (13) and macOS Sonoma (14) | |
# Disabling SIP is required ("csrutil disable" from Terminal in Recovery) | |
# Modifications are written in /private/var/db/com.apple.xpc.launchd/ disabled.plist, disabled.501.plist | |
# To revert, delete /private/var/db/com.apple.xpc.launchd/ disabled.plist and disabled.501.plist and reboot; sudo rm -r /private/var/db/com.apple.xpc.launchd/* | |
# user |
import tiktoken | |
import langdetect | |
T = tiktoken.get_encoding("o200k_base") | |
length_dict = {} | |
for i in range(T.n_vocab): | |
try: | |
length_dict[i] = len(T.decode([i])) | |
except: |
Hi:
perl -e 'print "hello world!\n"'
A simple filter:
perl -ne 'print if /REGEX/'
Filter out blank lines (in place):
import sys | |
import argparse | |
""" | |
Example usecase: | |
python split_srt_lines.py SUBTITLE_FILE_PATH.srt -o OUTPUT_FILE_PATH.srt --max_line_length=42 --comma_split_percent=75 | |
if you don't specify an output path, it will replace the file content of the input file |
@echo off | |
setlocal EnableDelayedExpansion | |
set DIR_ROOT=%~dp0. | |
set DIR_SRC=%DIR_ROOT%\src | |
set DIR_BUILD=%DIR_ROOT%\build | |
set DIR_WIRESHARK=%DIR_BUILD%\wireshark | |
set DIR_WINFLEXBISON=%DIR_BUILD%\winflexbison | |
set DIR_WIRESHARK_X64_LIBS=%DIR_BUILD%\wireshark-x64-libs | |
set DIR_WSBUILD64=%DIR_BUILD%\wsbuild64 |
## case-insensitive (uppercase from lowercase) completion | |
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}' | |
## case-insensitive (all) completion | |
#zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' | |
## case-insensitive,partial-word and then substring completion | |
#zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' |