Jsonnet: a data templating language
Today I learned that there is a templating language that is a superset of JSON: Jsonnet.
Today I learned that there is a templating language that is a superset of JSON: Jsonnet.
I just read What is a manifold? Easy to follow explanation.
Ketamine was actually restoring many of the exact same synapses in their exact same configuration that existed before the animal was exposed to chronic stress.
― Dr. Conor Liston
Source: Ketamine May Relieve Depression By Repairing Damaged Brain Circuits
Use the Digital Color Meter to find the hexadecimal color code of a specific color on macOS or OS X. The program shows default decimal values. Select "as Hexadecimal" in the "Display Values" submenu available under "View" to obtain hexadecimal values.
$ dscacheutil -q user -a name john
name: john
password: ********
uid: 501
gid: 20
dir: /Users/john
shell: /bin/bash
gecos: John Bokma
To look up information of all users, use:
dscacheutil -q user
In the afternoon I used GoAccess
to
generate a HTML report with
the access.log
of this website as input.
I read Martin Tournoij's article on why you shouldn't use JSON as configuration files. To summarise the shortcomings:
Today our daughter Alice turns 12 years old. Happy birthday little princess!
The day pages of tumblelog now can have a title that can be defined via the Markdown input file by putting text behind the date. This update is available on GitHub. For more information please read SEO friendly titles for tumblelog.
Today I refactored some Emacs Lisp for additional font locks in Emacs. The Markdown file in which I enter blog entries looks now much better.
After some playing with font-lock in Emacs I was wondering how to
highlight the entire line when it just has a %
character on
it in Markdown mode. Entire line as in all other columns, with a
background color.
So I asked this question at the Emacs StackExchange and very soon got a helpful answer by Tobias which with some additional Googling led to the following solution:
(defface markdown-item-face
'((t (:background "#364e7a")))
"Used to highlight %")
(add-hook 'markdown-mode-hook
(lambda()
(highlight-regexp
"^%\n"
'markdown-item-face)))
Now my blog posts in Emacs are separated by blue bars:
I just pushed two updates to the tumblelog repository:
thought-provoking.scss
.The default for the latter is 'week %V, %Y
' with %V
the ISO 8601 week
as a decimal number with an optional leading zero and %Y
the four
digit year.
In the afternoon I went with my mother to the garden centre "De Carlton" near to her house. We had a coffee and I took a few photos with my iPhone 5 of the plants on sale.
Select "Network" in the "Web Developer" submenu of "Tools". Reload the page. Right click on a URL and in the "Copy" menu select "Copy as cURL".
Select "Show Page Resources ⌥⌘A", right click on a URL and select "Copy as cURL".
Another tumblelog style has been added; adrift-in-dreams.scss
, see
my GitHub repository.
I just made screenshots, using Firefox, of the themes I have created for the tumblelog program and added them to my GitHub repository.
I just finished an update to the Perl version of tumblelog which makes it possible to give each day page a title. This is more SEO friendly. Tomorrow, I'll port this to the Python version and make both available on GitHub
I have been playing with font lock in Emacs and managed to give a specific face to each line starting with an ISO date. I use this in Markdown mode in which I write this blog. I will blog about this on my main blog tomorrow.
Today I had to disable past dates in a jQuery datepicker. I found the following solution:
$("#date").datepicker({minDate:0});
I just pushed another update to of tumblelog. This time I modified both the HTML and SCSS to make styling of a tumblelog easier. I also made the HTML slightly more semantic. Enjoy!
<img src="example.jpg"
loading="lazy" alt="example">
<iframe src="example.html"
loading="lazy"></iframe>
Read about it in Native Lazy Loading for img and iframe is Coming to the Web by Ben Halpern.
Currently listening to one of my favorite Yello albums; Pocket Universe.
ssh -fNCqD 1080 user@example.com
-f
- Fork in the background.-N
- No command is sent once the tunnel is up.-C
- Compress the data before sending it.-q
- Quiet mode.-D
- Dynamic application level port forwarding. Supports SOCKS protocol.The above creates a SOCKS proxy listening on port 1080.
See also How To Route Web Traffic Securely Without a VPN Using a SOCKS Tunnel.
I helped Paul out with the problem of importing a CSV file created in OpenOffice on Windows into an existing table on MySQL. After some reading I came up with a command similar to:
LOAD DATA LOCAL INFILE
"file.csv"
INTO TABLE tablename
COLUMNS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '"'
ESCAPED BY '"'
LINES TERMINATED BY '\r\n'
IGNORE 1 LINES;
Note the LINES TERMINATED
value, which must be '\r\n'
if the file
was created on Windows. If on Linux, use just '\n'
.
Don't forget the LOCAL otherwise MySQL can't execute the command if
running with the --secure-file-priv
option.
To have less
work correctly with UTF-8 files use:
LESSCHARSET='utf-8' less file.txt
While blogging for Plurrrr I bumped into a rendering issue which I could track
down to a re.sub
in
the
Python version of tumblelog. Read
about the issue and the fix in Python re.sub gotcha.