Skip to content

Instantly share code, notes, and snippets.

View yamalweb's full-sized avatar
💭
RUB++

yamal-web.ru yamalweb

💭
RUB++
View GitHub Profile
@rvrsh3ll
rvrsh3ll / windows-keys.md
Created February 18, 2024 22:44
Windows Product Keys

NOTE

These are NOT product / license keys that are valid for Windows activation.
These keys only select the edition of Windows to install during setup, but they do not activate or license the installation.

Index

@qutek
qutek / index.js
Created May 19, 2022 08:06
[Medusa Local File Service] Custom service to upload files / image directly to server #medusajs #nodejs
// src/api/index.js
import express from 'express';
const uploadDir = 'static';
export default () => {
const router = express.Router();
router.use(`/${uploadDir}`, express.static(uploadDir));
@dunderrrrrr
dunderrrrrr / GeoIP Block NGINX Ubuntu 20.04.md
Created April 19, 2021 08:28
Allow or block GeoIP in Nginx on Ubuntu 20.04

GeoIP Block NGINX Ubuntu 20.04

Block or filter IPs based on location in Nginx (tested on 1.18.0) on Ubuntu 20.04.

Install Nginx modules

To make use of the geographical filtering, we must first install the Nginx GeoIP module as well as the GeoIP database containing the mappings between visitors’ IP addresses and their respective countries. To do so, let’s execute:

$ sudo apt install libnginx-mod-http-geoip geoip-database

There's a workaround that might be useful for some people - use the Shadowsocks app for Android TV. Because that app only accepts a JSON configuration file, you need to convert the Outline key to JSON.

  1. Take the following JSON file template:
    {
        "server":"YOUR-SERVER",
        "server_port":12345,
        "local_port":1080,
        "password":"YOUR-PASSWORD",
        "method":"chacha20-ietf-poly1305",
@shadz3rg
shadz3rg / gost_engine.sh
Created October 15, 2018 11:19
Настройка ГОСТ OpenSSL под Ubuntu 18.04
# Ubuntu 18.04.1 LTS (GNU/Linux 4.15.0-36-generic x86_64)
# (из коробки) OpenSSL 1.1.0g 2 Nov 2017
# (из коробки) curl 7.58.0 (x86_64-pc-linux-gnu)
# PHP 7.2.10-0ubuntu0.18.04.1 (cli) (built: Sep 13 2018 13:45:02) ( NTS )
# Компилим GOST-engine
sudo apt install cmake libssl-dev
git clone --branch=openssl_1_1_0 https://github.com/gost-engine/engine.git gost-engine/engine
cd gost-engine/engine
cmake .
@brenopolanski
brenopolanski / vue-axios-cors.md
Last active December 10, 2024 08:10
Vue.js + Axios + CORS

Proxy requests using Webpack dev server to avoid cors in development mode.

In your webpack.config file add:

"devServer":{
  "proxy": {
    "/api": {
    "target": 'https://my-target.com',
    "pathRewrite": { '^/api': '' },
@pjmartorell
pjmartorell / vimeo_download_subtitles.md
Last active August 1, 2025 23:52
How to download subtitles/text tracks of a On Demand Vimeo video

Download subtitles/text tracks of an On-Demand Vimeo video

It works with on-demand videos that have the subtitles/captions included (CC symbol). You need to be registered in Vimeo in order to retrieve subtitles.

Steps

  1. Open Chrome Developer Tools
  2. Start playing the Vimeo video
  3. Look for any request named segment-XX.m4s (where XX is a number)
  4. Select the request and inspect the request payload, which is something in the form:
@bendasvadim
bendasvadim / gist:09b3b3c4c0de5810650c447f20f8061c
Last active February 4, 2024 19:45
PHP warning: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
При переносе сайта возникла ошибка smtp все было настроено но поста не отправляется, похожие ошибки можно найти "Обновился до PHP 7, не уходит почта с FormIt "
[2016-04-30 21:40:10] (ERROR @ /var/www/web1/www/core/model/modx/mail/phpmailer/class.smtp.php : 343) PHP warning: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
[2016-04-30 21:40:10] (ERROR @ /var/www/web1/www/core/components/formit/model/formit/fihooks.class.php : 552) [FormIt] Произошла ошибка при попытке отправить почту. Ошибка соединения с SMTP-сервером https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
Решение заняло 2 дня но оказалось очень простым
apt-get install --reinstall ca-certificates
@DawidMyslak
DawidMyslak / vue.md
Last active April 22, 2024 12:49
Vue.js and Vuex - best practices for managing your state

Vue.js and Vuex - best practices for managing your state

Modifying state object

Example

If you have to extend an existing object with additional property, always prefer Vue.set() over Object.assign() (or spread operator).

Example below explains implications for different implementations.

@kubaceg
kubaceg / Dockerfile
Created May 4, 2017 07:30
Docker install ioncube extension (php 5.6)
RUN curl -o ioncube.tar.gz http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz \
&& tar -xvvzf ioncube.tar.gz \
&& mv ioncube/ioncube_loader_lin_5.6.so `php-config --extension-dir` \
&& rm -Rf ioncube.tar.gz ioncube \
&& docker-php-ext-enable ioncube_loader_lin_5.6