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:
Some notes on accessing / exporting Apple's Screen Time data
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:
#!/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") |
#!/bin/bash | |
gdb -p "$1" -batch -ex 'set {short}$rip = 0x050f' -ex 'set $rax=231' -ex 'set $rdi=0' -ex 'cont' |
# My ISP-provided fiber optical modem broadcasts a line of a poem every ten seconds. Here's the tcpdump of the complete poem. | |
# The optical modem is made by Shanghai Nokia-Bell Co.,Ltd and its model number is G-140W-UD. It's provided by my ISP, China Unicom in Shenzhen. | |
$ tcpdump -i vlan10 ether proto 0x8300 | |
15:59:00.720301 00:00:00:00:00:12 (oui Ethernet) > Broadcast, ethertype Unknown (0x8300), length 72: | |
0x0000: 0000 0000 e4ea 8386 d93c 5468 6520 6461 .........<The.da | |
0x0010: 7920 4920 6c6f 7374 206d 7920 7665 7279 y.I.lost.my.very | |
0x0020: 2066 6972 7374 2074 6f6f 7468 2c00 0000 .first.tooth,... | |
0x0030: 0000 0000 0000 0000 0000 .......... | |
15:59:10.740778 00:00:00:00:00:12 (oui Ethernet) > Broadcast, ethertype Unknown (0x8300), length 72: |
#!/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/ |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<opml version="1.0"> | |
<head> | |
<title>Christophe subscriptions in feedly Cloud</title> | |
</head> | |
<body> | |
<outline text="Security" title="Security"> | |
<outline type="rss" text="Schneier on Security" title="Schneier on Security" xmlUrl="http://www.schneier.com/blog/index.rdf" htmlUrl="https://www.schneier.com/blog/"/> | |
<outline type="rss" text="Rhino Security Labs" title="Rhino Security Labs" xmlUrl="http://www.rhinosecuritylabs.com/blog/feed/" htmlUrl="https://rhinosecuritylabs.com"/> |
import datetime as dt | |
class datetime(dt.datetime): | |
"""The standard datetime class with the added support for the % and // | |
operators. | |
Refer to https://gist.github.com/treyhunner/6218526 | |
""" | |
def __divmod__(self, delta): | |
seconds = int((self - dt.datetime.min.replace(tzinfo = self.tzinfo)).total_seconds()) |