Skip to content

Instantly share code, notes, and snippets.

@ekam230
ekam230 / gist:0c355fd71d2bc7fcbe311c247a75f0ad
Created November 18, 2023 13:14
synology app remove from volume
#!/bin/bash
# Ask the user for their name
from_dir="volume3" #том откуда
dest_dir="volume1" #том куда
@ekam230
ekam230 / moonlight_sunshine_gamestream_guide.md
Created October 16, 2023 11:52 — forked from JasSuri/moonlight_sunshine_gamestream_guide.md
Moonlight and Sunshine gamestream guide for Windows 11

This guide was last updated: 20th December 2022, and the most optimum settings may differ as Sunshine and Moonlight are updated.

Overview

This guide is intended to help those migrating from streaming their games with Nvidia GameStream, to Sunshine. It will help you setup the Moonlight client and Sunshine gamesteam host to stream your PC games to your other devices. The aim is to optimise the settings to get similar streaming performance as Nvidia GameStream.

Prerequisites

  1. Download and install Moonlight client on your chosen device
  2. Download and install the nightly build of Sunshine gamestream host on the PC which you want to stream games from.
http://linuxcnc.org/docs/stable/html/getting-started/getting-linuxcnc.html#_installing_on_debian_buster_with_preempt_rt_kernel
На 6 пункте обычно не работает кейсервер записаный в строе команды и нужно использовать альтернативный кейсервер предложенный там же
Так ставится 2.8 версия практически на любой калькулятор работающий на образе основанном на 10 дебиане
Установка LinuxCNC2.9 из исходников на чистый образ Debian11.2
1. ставим git.
#!/bin/bash
# install base packages for displaying qtvcp screens and sounds
echo -e '\ninstalling common base packages'
sudo apt-get install -y gstreamer1.0-tools espeak espeak-ng sound-theme-freedesktop
echo -e '\ninstalling base packages for python2'
sudo apt-get install -y python-opengl python-pyqt5 python-pyqt5.qsci python-pyqt5.qtsvg python-pyqt5.qtopengl python-opencv python-dbus python-dbus.mainloop.pyqt5 python-espeak python-pyqt5.qtwebkit python-xlib python-cairo
# prompt to install designer
#!/bin/bash
# install base packages for displaying qtvcp screens and sounds
echo -e '\ninstalling common base packages'
sudo apt-get install -y gstreamer1.0-tools espeak espeak-ng sound-theme-freedesktop
echo -e '\ninstalling base packages for python3'
sudo apt-get install -y python3-opengl python3-pyqt5 python3-pyqt5.qsci python3-pyqt5.qtsvg python3-pyqt5.qtopengl python3-opencv python3-dbus python3-dbus.mainloop.pyqt5 python3-espeak python3-pyqt5.qtwebkit python3-xlib python3-numpy python3-cairo python3-gi-cairo
# prompt to install designer
@ekam230
ekam230 / typescript.ts
Created February 13, 2022 08:47
Typescript learn
//JS
typeof 42 //number
typeof 'str' //string
typeof true //boolean
typeof [] //object
typeof {} //object
typeof null //object
typeof undefined //undefined
typeof Symbol(); //symbol
@ekam230
ekam230 / def args kwargs.py
Created July 11, 2020 01:35
How use args kwarg in function Python
def version3(a, b , *args, **kwrags): print(a) print(b) # new function. if args: for c in args: print(c) if kwrags: for key, value in zip(kwrags.keys(), kwrags.values()): print(key,':', value)
/* ------------------------------------------------------------------------ */
var regexes = {
num: /^\d+$/,
ports: /^\d+(-\d+)?(:\d+)?$/,
phone: /^[\d\*#\(),\-+wpdt]+$/,
'int': /^$0(x[\da-f]+|[0-7]+)|[1-9]\d+/i,
WPSPin: /^\d{8}$/,
pin: /^\d{4,8}$/,
hex: /^[\da-f]+$/i,
bound: /^\[(\d+)-(\d+)\]$/,
@ekam230
ekam230 / gist:4b3330e2e541d1a27f9b5f965e8ac226
Created June 30, 2019 14:44 — forked from SimonSun1988/gist:2ef7db45e46b889783647d941ec15e4d
解決 Ubuntu "can’t set the locale; make sure $LC_* and $LANG are correct" 的錯誤
## 安裝語系檔
`$ sudo locale-gen "en_US.UTF-8"`
## 重新設定語系檔
`$ sudo dpkg-reconfigure locales`
## 設定檔
//только авторизованный пользователь может скачать файл
Route::group(['middleware' => 'auth'], function () {
//обращаемся к маршруту /download?f=path
Route::get('download', function () {
//получаем GET запрос
$path = request('f');
//смотрим на расширение запрашиваемого файла