Skip to content

Instantly share code, notes, and snippets.

View default-writer's full-sized avatar
🚩
creating an app

default-writer default-writer

🚩
creating an app
View GitHub Profile
@default-writer
default-writer / *.ps1
Last active July 25, 2018 08:04
File associations (*.ps1) for FAR File Manager 3.0
@start /max cmd /k powershell -file .\!.!
@default-writer
default-writer / config.cmd
Created July 4, 2018 06:28
Git global configuration script
git config --system core.longpaths true
URL
([A-Za-z]{3,9}:\/\/)([-;&=\+\$,\w]+@|[-;&=\+\$,\w]+:\w+@)?([-A-Za-z0-9\.]+(?::\d+)?)+(\/)?([\-\+&;%@\/\w]+\/)?([\-\+=&;%@\.\w]+)?(\??[A-Za-z0-9]+(?:=[\-\+=&;%@\/\.\w]+|[\-\+=&;%@\/\.\w]+)(?:[&\w+=[\-\+=&;%@\/\.\w]+]+)?)?(?:(#[A-Za-z0-9]+))?
([A-Za-z]{3,9}:\/\/)([-;&=\+\$,\w]+@|[-;&=\+\$,\w]+:\w+@)?([-A-Za-z0-9\.]+(?::\d+)?)+(\/)?([\-\+&;%@\/\w]+){1,}?([\-\+=&;%@\.\w]+)?(\??[A-Za-z0-9]+(?:=[\-\+=&;%@\/\.\w]+|[\-\+=&;%@\/\.\w]+)(?:[&\w+=[\-\+=&;%@\/\.\w]+]+)?)?(?:(#[A-Za-z0-9]+))?
([A-Za-z]{3,9}:\/\/)([-;&=\+\$,\w]+@|[-;&=\+\$,\w]+:\w+@)?([-A-Za-z0-9\.]+(?::\d+)?)+(\/)?([\-\+&;%@\/\w]+\/)?([\-\+=&;%@\.\w]+)?(\??[A-Za-z0-9]+(?:=[\-\+=&;%@\/\.\w]+|[\-\+=&;%@\/\.\w]+)(?:[&\w+=[\-\+=&;%@\/\.\w]+]+)?)?(?:(#[A-Za-z0-9]+))?
URL path after /
([\-\+&;%@\/\w]+\/)?([\-\+=&;%@\.\w]+)?(\??[A-Za-z0-9]+(?:=[\-\+=&;%@\/\.\w]+|[\-\+=&;%@\/\.\w]+)(?:[&\w+=[\-\+=&;%@\/\.\w]+]+)?)?(?:(#[A-Za-z0-9]+))?
@default-writer
default-writer / gist:5347e5796214df6626cde6a73b2a5f66
Last active July 21, 2018 16:59
URL regural expression link
https://regexr.com/3sn02
https://regexr.com/3spn2
@default-writer
default-writer / kms
Created July 22, 2018 16:07 — forked from CHEF-KOCH/KMS_office.cmd
KMS server Windows
Online kms host address:
--------
kms.digiboy.ir
54.223.212.31
kms.cnlic.com
kms.chinancce.com
kms.ddns.net
franklv.ddns.net
k.zpale.com
m.zpale.com
$Uri = "http://midnightfreddie.com/reddit/simpletable.html"
$InfoPage = Invoke-Webrequest -Uri $Uri
# Iterate over each <tbody> which contain all the body rows for each table
$InfoPage.ParsedHtml.getElementsByTagName("tbody") | ForEach-Object {
$Headers = $null
# Might need to uncomment the following line depending on table being parsed
# get total requests by status code
awk '{print $9}' /var/log/nginx/access.log | sort | uniq -c | sort -rn
# get top requesters by IP
awk '{print $1}' /var/log/nginx/access.log | sort | uniq -c | sort -rn | head
# get top requesters by user agent
awk -F'"' '{print $6}' /var/log/nginx/access.log | sort | uniq -c | sort -rn | head
# get top requests by URL
@default-writer
default-writer / main.go
Created February 2, 2019 13:28 — forked from mcihad/main.go
Check standart django password in go language
package main
import (
"crypto/sha256"
"encoding/base64"
"fmt"
"golang.org/x/crypto/pbkdf2"
"strconv"
"strings"
)
@default-writer
default-writer / nginxproxy.md
Created February 4, 2019 15:37 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

variables:
NUGET_PACKAGES: ${CI_PROJECT_DIR}/packages
cache:
key: api-${CI_COMMIT_REF_SLUG}
paths:
- .opencover
- .coverlet
- .sonarqube
- IntegrationTests/bin