Skip to content

Instantly share code, notes, and snippets.

View webnitros's full-sized avatar

Андрей webnitros

View GitHub Profile
@webnitros
webnitros / minio-upload.sh
Created August 3, 2023 04:33 — forked from PhilipSchmid/minio-upload.sh
Upload data to Minio using CURL
#!/bin/bash
# Usage: ./minio-upload my-bucket my-file.zip
bucket=$1
file=$2
host=minio.example.com
s3_key=svc_example_user
s3_secret=svc_example_user_password
@webnitros
webnitros / defaults
Created October 17, 2022 12:26 — forked from diolektor/defaults
Настройка хостов nginx для домашнего использования
# По мотивам http://habrahabr.ru/post/142648/
# Все проекты лежат по адресу: /home/projects/{имя.проекта}/public
server {
listen 80 default; # этот конфиг - умолчательный для 80 порта
server_name _; # хитрый ключик, обозначающий, что этот конфиг применим для любого сайта
set $sathost $host; # В sathost будет лежать имя сайта. Так же должна называться директрия с сайтом
root /home/projects/$sathost/public; # конень сайта определяем автоматически
@webnitros
webnitros / sample_json_import.php
Created July 27, 2018 11:44 — forked from sepiariver/sample_json_import.php
Imports a JSON file as output from the sample_json_export.php script.
<?php
// Only run via SSH
if (PHP_SAPI !== 'cli') exit();
// Instantiate MODX
@include(dirname(__FILE__) . '/config.core.php');
if (!defined('MODX_CORE_PATH')) define('MODX_CORE_PATH', dirname(__FILE__) . '/core/');
include_once (MODX_CORE_PATH . "model/modx/modx.class.php");
$modx= new modX();
$modx->initialize('web');
@webnitros
webnitros / setup_selenium.sh
Created April 10, 2018 02:22 — forked from curtismcmullan/setup_selenium.sh
Setup Selenium Server on Ubuntu 14.04
#!/bin/bash
# Following the guide found at this page
# http://programmingarehard.com/2014/03/17/behat-and-selenium-in-vagrant.html
echo "\r\nUpdating system ...\r\n"
sudo apt-get update
# Create folder to place selenium in