Skip to content

Instantly share code, notes, and snippets.

@Chocksy
Chocksy / info.md
Created December 29, 2022 09:13
Synology DSM 7.0 systemctl service run at startup (code-server)

Synology NAS with DSM 7.0 that runs code-server at startup

I wanted to run code-server on my synology nas but without running it via docker as i wanted it to have access to the main terminal and all the files. This could be a security risk but you do have options to improve that.

Steps to install it are:

  1. ssh into your nas
  2. run curl -fsSL https://code-server.dev/install.sh | sh

Steps to create a systemctl service that will run at boot and keep code-server running.

@semlinker
semlinker / index.html
Last active October 11, 2024 22:02
Implement Concurrent Download of Large Files in JavaScript
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Concurrent Download Demo</title>
<script src="multi-thread-download.js"></script>
</head>
<body>
@garaud
garaud / sqlalchemy-orm-query-to-dataframe.py
Last active June 7, 2024 13:55
Example to turn your SQLAlchemy Query result object to a pandas DataFrame
# -*- coding: utf-8 -*-
"""From a Query.all(), turn this result to a pandas DataFrame
Table creation and example data come from the official SQLAlchemy ORM
tutorial at http://docs.sqlalchemy.org/en/latest/orm/tutorial.html
Just take a look at the 'query_to_dict' function and the last part of the __main__.
"""