Skip to content

Instantly share code, notes, and snippets.

@heniu75
heniu75 / synology-shutdown-temperature.md
Created June 14, 2024 09:48 — forked from borekb/synology-shutdown-temperature.md
How to increase the shutdown temperature on Synology NAS

Synology: how to increase shutdown temperature

My Synology DS218+ runs with a single SSD disk that has an operating temperature range of 0–70 °C, which is common for SSDs. Synology, however, has a default shutdown temperature of 61 °C, probably due to HDDs and some lazy programming.

I'm a very light user of NAS – all I want is a network attached storage and silence. My DS218+ has one 2 TB SSD disk in it and I've changed the system fan for a quieter / slower one.

Everything runs fine but about once in a month, I get this notification:

[Synology DS218+]Synology shut down due to disk overheating. >

@heniu75
heniu75 / vscode-macos-context-menu.md
Created April 9, 2023 08:54 — forked from idleberg/vscode-macos-context-menu.md
“Open in Visual Studio Code” in macOS context-menu

Open in Visual Studio Code

  • Open Automator
  • Create a new document
  • Select Quick Action
  • Set “Service receives selected” to files or folders in any application
  • Add a Run Shell Script action
    • your default shell should already be selected, otherwise use /bin/zsh for macOS 10.15 (”Catalina”) or later
    • older versions of macOS use /bin/bash
  • if you're using something else, you probably know what to do 😉
@heniu75
heniu75 / FastChannel.cs
Created July 20, 2021 17:14 — forked from Manuel-S/FastChannel.cs
Fast Shared Memory Remoting by Joseph Albahari
using System.Threading.Tasks;
using System.IO.MemoryMappedFiles;
using System.Runtime.InteropServices;
using System.Security.Cryptography;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
async Task Main()
{
using (var channel = DemoServer())
@heniu75
heniu75 / docker_install.sh
Created June 12, 2021 09:09 — forked from n1snt/docker_install.sh
A simple shell script to install and setup docker on ubuntu & ubuntu based distros.
echo"Removing docker if installed...."
sudo apt-get -y remove docker docker-engine docker.io containerd runc
echo"Updating..."
sudo apt-get -y update && sudo apt-get -y upgrade
echo"Installing docker dependencies"
sudo apt-get -y install \
apt-transport-https \
ca-certificates \
@heniu75
heniu75 / Synology-Diskstation-Git.md
Created July 12, 2020 08:43 — forked from walkerjeffd/Synology-Diskstation-Git.md
Instructions for setting up git server on Synology Diskstation

Configure Synology NAS as Git Server

Instructions for setting up a git server on a Synology NAS with Diskstation. Specifically, I am using a DS414 with DSM 5.0.

Set Up User and Folder

  • Create user gituser via Diskstation interface (with File Station and WebDAV privilages)
  • Add new shared folder called git (located at /volume1/git) with read/write access for gituser and admin. This folder will hold all the repos.
  • Install Git Server package via Diskstation
@heniu75
heniu75 / Mac OS X: Open in Visual Studio Code
Last active July 4, 2020 09:22 — forked from tonysneed/Mac OS X: Open in Visual Studio Code
Add a command to Finder services in Mac OSX to open a folder in VS Code
- Open Automator
- File -> New -> Quick Action
- Change "Service Receives" to "files or folders" in "Finder"
- Add a "Run Shell Script" action
- Change "Pass input" to "as arguments"
- Paste the following in the shell script box: open -n -b "com.microsoft.VSCode" --args "$*"
-- For compatibility choose::
---- "Shell: /bin/bash"
---- "Pass input: as arguments"
- Save it as something like "Open in Visual Studio Code"
@heniu75
heniu75 / sample.spec.js
Created March 10, 2020 09:18
Example protractor test page reloads (e.g. auth with Azure). Notice use of browser.driver.get() vs browser.get()
import { browser, element, by } from 'protractor';
describe('angularjs homepage todo list', () => {
it('should add a todo', async () => {
await browser.driver.get('http://localhost:4200');
await browser.driver.sleep(15000);
const xyzButton = element(by.id('xyz'));
const text = await xyzButton.getText(); // ).toContain('Add travel risk assessment form');
expect(text).toContain('Add travel risk assessment form');
});
@heniu75
heniu75 / readme.md
Created March 1, 2020 11:19
Visual Studio Code - Typescript Node Debugging ...
@heniu75
heniu75 / launch.json
Created March 1, 2020 09:21
Visual Studio Code and Node Debugging configuration
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
@heniu75
heniu75 / launch.json
Last active March 1, 2020 09:15
Visual Studio Code - React Debug Config
{
"version": "0.2.0",
"configurations": [
{
"name": "Chrome",
"type": "chrome",
"request": "launch",
"url": "http://localhost:3000",
"webRoot": "${workspaceRoot}/src"
}