Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.
You've got two main options:
You can inherit the environment variables from PID 1 by iterating over the list of null-terminated strings
in /proc/1/environ
, parsing the first characters up to the first =
as the variable name, setting the
remaining value as that variable, and exporting it.
The Code Snippet
This works with multiline environment variables, and environment variables with arbitrary values, like
strings, including =
or JSON blobs.
Paste this in your current terminal session to inherit the environment variables from PID 1:
Some notes on accessing / exporting Apple's Screen Time data
about:config settings to harden the Firefox browser. Privacy and performance enhancements.
You can use this settings in Tor browser too.
To change these settings type 'about:config' in the url bar.
Then search the setting you would like to change and modify the value. Some settings may break certain websites from functioning and
rendering normally. Some settings may also make firefox unstable.
Not all these changes are necessary and will be dependent upon your usage and hardware. Do some research on settings if you don't understand what they do. These settings are best combined with your standard privacy extensions
#!/bin/bash | |
# Find existing files in download/complete that are not in movies or tvshows. | |
export DOWNLOAD_FOLDER=path/to/downloads | |
export MOVIES_FOLDER=path/to/movies | |
export TVSHOWS_FOLDER=path/to/tvshows | |
findExistingFile() { | |
file=$(find $MOVIES_FOLDER/ $TVSHOWS_FOLDER/ -samefile "$1") |
by xero updated 10.29.24
#!/bin/bash | |
gdb -p "$1" -batch -ex 'set {short}$rip = 0x050f' -ex 'set $rax=231' -ex 'set $rdi=0' -ex 'cont' |
#!/bin/bash -e | |
curl -O https://dl.google.com/chrome/mac/stable/GGRO/googlechrome.dmg | |
hdiutil attach googlechrome.dmg | |
SRC=/Volumes/Google\ Chrome/Google\ Chrome.app/Contents/Frameworks/Google\ Chrome\ Framework.framework/Libraries/WidevineCdm | |
DEST=/Applications/Chromium.app/Contents/Frameworks/Chromium\ Framework.framework/Libraries/ | |
cp -R "$SRC" "$DEST" | |
hdiutil detach /Volumes/Google\ Chrome/ |
Partial evaluation means to fix some variables in the given code before execution. With a traditional implementation of a compiler or an interpreter, all variables are replaced with its value on each evaluation of that variable. This is because a variable can change at any timing. This is, however, not always true in actual applications. Almost all of large applications has setting variables and data
import datetime as dt | |
class datetime(dt.datetime): | |
def __divmod__(self, delta): | |
seconds = int((self - dt.datetime.min).total_seconds()) | |
remainder = dt.timedelta( | |
seconds=seconds % delta.total_seconds(), | |
microseconds=self.microsecond, | |
) |