Skip to content

Instantly share code, notes, and snippets.

View SuperKa3a's full-sized avatar

Олег Казаков SuperKa3a

View GitHub Profile
package main
import (
"fmt"
"log"
"net/http"
)
func getMovieQuote() map[string]string {
m := make(map[string]string)
@SuperKa3a
SuperKa3a / secret_detection.yml
Created September 30, 2022 03:51 — forked from halloei/secret_detection.yml
GitLab Secret Detection which fails when vulnerabilities were found
# This job overrides the default secret detection job from GitLab
# (https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Jobs/Secret-Detection.gitlab-ci.yml)
# and fails if vulnerabilities were found. The exit code represents the number of vulnerabilities.
#
# Requirements:
# - Stage "test"
include:
- template: Security/Secret-Detection.gitlab-ci.yml
@SuperKa3a
SuperKa3a / api_backends.conf
Created September 14, 2021 03:36 — forked from nginx-gists/api_backends.conf
Deploying NGINX Plus as an API Gateway, Part 1
upstream warehouse_inventory {
zone inventory_service 64k;
server 10.0.0.1:80;
server 10.0.0.2:80;
server 10.0.0.3:80;
}
upstream warehouse_pricing {
zone pricing_service 64k;
server 10.0.0.7:80;
@SuperKa3a
SuperKa3a / .htaccess
Created February 25, 2021 19:57 — forked from ScottPhillips/.htaccess
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@SuperKa3a
SuperKa3a / autoload_d7.php
Created November 3, 2020 14:54
Bitrix(d7). Autoload classes
<?php
use \Bitrix\Main\Loader;
Loader::registerAutoLoadClasses($module = null, [
'Site\\Controller' => '/local/php_interface/lib/Site/Controller.php',
]);
//usage
use Site\Controller;
$controller = new Controller();