Skip to content

Instantly share code, notes, and snippets.

root@droplet1:/var/www/html# ls -l
total 288
drwxr-xr-x 2 root root 4096 Jul 15 06:24 a
lrwxrwxrwx 1 root root 13 Jul 28 18:23 ggg.txt -> /root/abc/f.f
lrwxrwxrwx 1 root root 10 Jul 28 18:23 ggga -> /root/abc/
-rw-r--r-- 1 root root 33 Jul 15 06:23 index.html
-rw-r--r-- 1 root root 10918 Jul 15 06:12 oldindex.html
-rw-rw-rw- 1 root root 106056 Jul 15 16:22 pic.jpg
-rwxr-xr-x 1 root root 165473 Jul 15 06:19 pic1.jpg
root@droplet1:/var/www/html#
H:\fon\Topics\programming\nodefiles\youtubeuploaderthing>node blah.js
(node:4624) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use `node --trace-warnings ...` to show where the warning was created)
H:\fon\Topics\programming\nodefiles\youtubeuploaderthing\blah.js:1
import { upload } from 'youtube-videos-uploader' //Typescript
^^^^^^
SyntaxError: Cannot use import statement outside a module
←[90m at Object.compileFunction (vm.js:344:18)←[39m
←[90m at wrapSafe (internal/modules/cjs/loader.js:1048:15)←[39m
H:\fon\Topics\programming\nodefiles\youtubeuploaderthing>npm i youtube-videos-uploader
npm WARN saveError ENOENT: no such file or directory, open 'H:\fon\Topics\programming\nodefiles\package.json'
npm WARN enoent ENOENT: no such file or directory, open 'H:\fon\Topics\programming\nodefiles\package.json'
npm WARN nodefiles No description
npm WARN nodefiles No repository field.
npm WARN nodefiles No README data
npm WARN nodefiles No license field.
+ youtube-videos-uploader@1.3.65
updated 1 package and audited 139 packages in 1.514s
#!/usr/bin/env python
from datetime import datetime
import os
import requests
LOG = '/tmp/ip.log'
URL = 'https://ipinfo.io/ip'
r = requests.get(URL)
so I have this issue.. I have a VPS hosted by digitalocean, that I can ssh to. I have two locations, one is a flat with a laptop whose screen I want to view, and the other location a house where I mainly reside. I look to solve the issue with SSH and VNC eg TightVNC. The flat location has a router with a mobile sim card in there. I can't port forward at the flat side 'cos that's behind CGN. And I don't want to port forward from the home side, I want to use my VPS as a middle man and make use of its open sshd server port. From the flat laptop, I do flat$ ssh -R 50500:127.0.0.1:5900 root@ip Then I drive to the house and I do house$ssh -L 1234:127.0.0.1:50500 root@ip That works for a while then breaks. So I figured the connection is breaking so I wrapped the flat ssh -R line, in a while. flat$ while true; do ssh -R 50500:127.0.0.1:5900 user@myip; done Then I found that that maybe wasn't or wasn't always looping, because maybe something went wrong with the ssh connection or tunneled connection but d
G:\vids\apple> ffmpeg -i IMG_0030.MOV -acodec copy -vcodec h264_qsv blah.mp4
ffmpeg version N-94664-g0821bc4eee Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 9.1.1 (GCC) 20190807
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --e
nable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus -
-enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --ena
ble-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enabl
e-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid
--enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avi
A molecule of NaCl (one sodium ion plus one chloride ion) is electrically neutral. It qualifies as a molecule just as much as a molecule of carbon monoxide. But for sodium chloride, molecules only exist in the gas phase.
In the solid phase (and in the liquid phase to the best of my knowledge), sodium and chloride ions are not paired up and do not form discernible molecules of NaxClx. In in the gas phase they do, as this is lower-energy than separate gas-phase ions. My knowledge of the literature of this is not large, but I have heard that gas phase sodium chloride consists of molecules of Na2Cl2.
Likewise, sodium chloride in the gas phase consists of molecules, and (I’m told) they have a particular structure and composition. A molecule of Na1Cl1 will be quite different than a molecule of Na2Cl2. In the condensed phases (solid or liquid) there are no molecules, just individual ions, so NaCl is a better description.
pi@raspberrypi:~ $ cat ./testplayaudio3.py
# https://stackoverflow.com/questions/20021457/playing-mp3-song-on-python
import playsound
playsound.playsound('/home/pi/mario1.mp3', True)
pi@raspberrypi:~ $ python ./testplayaudio3.py
No handlers could be found for logger "playsound"
Traceback (most recent call last):
File "./testplayaudio3.py", line 4, in <module>
pi@raspberrypi:~ $ pip install schedule
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: schedule in ./.local/lib/python2.7/site-packages (0.6.0)
pi@raspberrypi:~ $
pi@raspberrypi:~ $
pi@raspberrypi:~ $
pi@raspberrypi:~ $
pi@raspberrypi:~ $ sudo python alarm.py
Traceback (most recent call last):
File "alarm.py", line 4, in <module>
G:\vids\recent\aaa\aa>ffmpeg -hwaccel qsv -c:v h264_qsv -i test.mp4 -v verbose -f null -
ffmpeg version N-94664-g0821bc4eee Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 9.1.1 (GCC) 20190807
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --e
nable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus -
-enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --ena
ble-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enabl
e-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid
--enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2