Skip to content

Instantly share code, notes, and snippets.

@mailinglists35
Last active January 25, 2019 22:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mailinglists35/a6f99a079b557a07a0694c46fbc1a734 to your computer and use it in GitHub Desktop.
Save mailinglists35/a6f99a079b557a07a0694c46fbc1a734 to your computer and use it in GitHub Desktop.
What I learned today - Things I might else forget. Let's save this to a public gist on github
`seq -f %05g start end` helps produce numbers padded/prefixed with zeroes.
more on that via Secrets of “printf” by Professor Don Colton
https://web.archive.org/web/20180422200414/http://www.cypress.com/file/54441/download
`sed /string/d` deletes the line containing the string
`ssh -o StrictHostKeyChecking=no` automatically accepts and saves the public remote host key
`ssh -J user@remote:port` make use of a jump host
ParaFly has moved to github https://github.com/ParaFly/ParaFly
`paste -d, file1 file2` merges line by line each file and uses comma to delimit the fields
filter out icmp pings/reply icmp[icmptype] != icmp-echo and icmp[icmptype] != icmp-echoreply
rmlogotest.exe or sigterm.exe
https://superuser.com/questions/959364/on-windows-how-can-i-gracefully-ask-a-running-program-to-terminate
https://support.microsoft.com/en-ca/help/178893/how-to-terminate-an-application-cleanly-in-win32
related: send any message to a window https://github.com/stefankueng/sendmessage/
samba selinux default does NOT work:
semanage fcontext -a -t samba_share_t "/srv/samba/example(/.*)?"
restorecon -Rv /srv/samba/example/
for home dirs: setsebool -P samba_enable_home_dirs 1
serve time with chronyd on ubuntu: allow 10.0.0.0/8
kernel tracing kworker ksoftirqd kipmi
mount -t debugfs none /sys/kernel/debug
echo workqueue:workqueue_queue_work > /sys/kernel/debug/tracing/set_event
cat /sys/kernel/debug/tracing/trace_pipe > out.txt
(wait a few secs)
^C
cat /proc/THE_OFFENDING_KWORKER/stack
error: Failed to allocate internet-domain X11 display socket
Apparently this is a bug in sshd. This is what I found in this thread:
Description:
Looks like the fix for CR 6684003 breaks sshd's ability to bind to a local
socket for X forwarding. bind() returns EADDRNOTAVAIL for every bind call to ::1
for ports 6010->6999, but never tries IPv4 localhost addresses.
So apparently if you don't have an IPv6 interface, you get this error.
There were two solutions, either put "AddressFamily inet" in the sshd_conf and restart
or enable IPv6 on lo0.
I went with the sshd_config solution and it works.
This process is actually generating medium and small sized videos for quick playback on any devices that are not holding your full sized library. The videos are temporarily stored here before they are uploaded to iCloud.
Photos Library.photoslibrary/private/com.apple.cloudphotosd/CloudSync.noindex/GeneratedVideoDerivatives
As far as I can tell the additional space does not count against you. It seems that Apple has decided it is cheaper to take up a bit more bandwidth than to do the video processing on their end.
run X applications as another user via ssh
from root to another user:
cd /tmp/; cat ~/.Xauthority | runuser user -c 'xauth merge -' && su - user -c 'vmware &'
from another user as root:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment