Skip to content

Instantly share code, notes, and snippets.

@SanCoder-Q
SanCoder-Q / synology.startup
Created December 25, 2017 14:29
Synology NAS - How to make a program run at startup
Synology NAS - How to make a program run at startup
The other day I created a little node.js project to keep track of some finances. Synology has a node.js package but that just installs the tools - it has no 'container' or any other support to drop files and have it run automagically. Maybe one day.
In the meantime, you can start your project when you SSH into the NAS. My project has a 'www' script which bootstraps my project, so to start I simply type 'node bin/www' from the project directory. But, it only runs while I'm logged in, and if I log out for any reason, the process dies. That's hardly useful when I'm away from home, or on a different PC. So I decided to have a look at starting my project as a Linux service.
After doing a lot of research into how Synology does services, and a few failed attempts at init scripts, I found that Synology DSM (since version 5 perhaps) bundles Upstart, which is a neat little tool to deal with services on Linux. It's most prevalent on Debian and derivatives (notably Ub
@dgerrells
dgerrells / cargo_no_wasm
Created November 8, 2024 20:52
how fast is rust
[package]
name = "how_fast_is_rust"
version = "0.1.0"
edition = "2021"
[dependencies]
minifb = "0.27"
rand = "0.8"
wasm-bindgen = "0.2.95"
@yezz123
yezz123 / Exploitation.md
Created May 24, 2021 12:09
Pentesting-Exploitation
@drivevinhvien3
drivevinhvien3 / LARP on Ubuntu Server.md
Created January 15, 2025 08:37
LARP on Ubuntu Server

Okay, here's a more detailed explanation of LARP on Ubuntu Server in English:

LARP on Ubuntu Server: A Deep Dive

LARP, in the context of web development, stands for Linux, Apache, MySQL, and PHP/Python/Perl. It represents a popular and robust software stack used for hosting dynamic websites and web applications. This acronym breaks down as follows:

  • Linux (Operating System): This forms the foundational operating system layer of the stack. In this case, we're specifically focusing on Ubuntu Server, a variant of the Linux operating system tailored for server environments.
  • Apache (Web Server): The Apache HTTP Server is a widely-used web server responsible for handling HTTP requests from clients (like web browsers) and serving back the appropriate web content (HTML pages, images, etc.). It acts as the intermediary between the user and the server-side logic and data.
  • MySQL (Database Management System): MySQL is a relational database management system (RDBMS) used for storing,
@yifanzz
yifanzz / code-editor-rules.md
Created December 17, 2024 00:01
EP12 - The One File to Rule Them All

[Project Name]

Every time you choose to apply a rule(s), explicitly state the rule(s) in the output. You can abbreviate the rule description to a single word or phrase.

Project Context

[Brief description ]

  • [more description]
  • [more description]
  • [more description]

setup adb

Add platform-tools to your path

echo 'export ANDROID_HOME=/Users/$USER/Library/Android/sdk' >> ~/.bash_profile
echo 'export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools' >> ~/.bash_profile

Refresh your bash profile (or restart your terminal app)

source ~/.bash_profile
@wuriyanto48
wuriyanto48 / README.md
Created January 17, 2021 05:51
Install Maven on Ubuntu

Install Java and Maven on Ubuntu

Install JRE and JDK

install JDK

$ sudo apt-get install default-jdk
$ javac -version
@mattatz
mattatz / Matrix.hlsl
Last active January 15, 2025 11:00
Matrix operations for HLSL
#ifndef __MATRIX_INCLUDED__
#define __MATRIX_INCLUDED__
#define IDENTITY_MATRIX float4x4(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)
float4x4 inverse(float4x4 m) {
float n11 = m[0][0], n12 = m[1][0], n13 = m[2][0], n14 = m[3][0];
float n21 = m[0][1], n22 = m[1][1], n23 = m[2][1], n24 = m[3][1];
float n31 = m[0][2], n32 = m[1][2], n33 = m[2][2], n34 = m[3][2];
float n41 = m[0][3], n42 = m[1][3], n43 = m[2][3], n44 = m[3][3];
@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active January 15, 2025 10:58
Conventional Commits Cheatsheet

Conventional Commit Messages starline

See how a minor change to your commit message style can make a difference.

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions, determine version and generate changelogs

Commit Message Formats

Default

@kyo-takano
kyo-takano / introduction-to-ternary-neural-networks.ipynb
Last active January 15, 2025 10:50
introduction-to-ternary-neural-networks.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.