Skip to content

Instantly share code, notes, and snippets.

View soar's full-sized avatar
:octocat:
Moving forward

Aleksey @soar Smyrnov soar

:octocat:
Moving forward
View GitHub Profile
@soar
soar / ssh-copy-id.ps1
Created March 29, 2015 16:35
ssh-copy-id for windows
# ssh-copy-id analog for Windows systems
# Script to install your public key on a remote machine
# The remote machine must accept password authentication,
# or one of the other keys in your Putty Agent, for this to work.
#
# (c) soar - http://soar.name
# Dialog for public key selection
Function Select-File()
{
@soar
soar / userscript.js
Created November 2, 2023 21:51
Disable Jira Edit-On-Click
// ==UserScript==
// @name Disable Jira Edit-On-Click
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Disable click edit in Jira issue descriptions
// @match https://*.atlassian.net/browse/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=atlassian.net
// @grant none
// ==/UserScript==
{
"basics": {
"name": "Aleksey Smyrnov",
"email": "i@soar.name",
"phone": "+19477777742",
"photo": {
"url": "https://cdn.rxresu.me/uploads/291066/352420/1680096889008.jpg",
"filters": {
"size": 88,
"shape": "rounded-square",
@soar
soar / add-task.bat
Created March 29, 2015 17:29
Windows VPN auto routes
schtasks /create /F /RL HIGHEST /TN "Маршруты для VPN" /TR "C:\vpnroutes.bat /connect" /SC ONEVENT /EC System /MO "*[System[Provider[@Name='Rasman'] and (Level=4 or Level=0) and (EventID=20267)]] and *[EventData[Data='My VPN Connection']]"
@soar
soar / gopass-client.py
Created November 14, 2019 12:52 — forked from wakemaster39/gopass-client.py
Ansible Vault Password integration with gopass
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Assuming you have a working gopass installation. I personally use multiple mounts and I store all the passwords under a
# single directory.
#
# Add the following section to your `ansible.cfg`
#
# [vault]
# mount='store-X' # replace `store-x` with your actual store, if using the root set to an empty string
@soar
soar / postgres_queries_and_commands.sql
Created June 19, 2019 10:56 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
@soar
soar / nginx.conf
Created February 1, 2019 13:32 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
68.171.224.0/19
74.82.64.0/19
103.246.200.0/22
178.239.88.0/21
203.104.152.0/22
203.104.144.0/21
203.104.128.0/20
91.108.4.0/22
91.108.8.0/22
91.108.12.0/22
@soar
soar / markdownblock.py
Last active April 1, 2018 12:52
Wagtail Markdown - simplest way
# django
from django import forms
from django.contrib.staticfiles.templatetags.staticfiles import static
from django.forms import Media, widgets
from django.utils.functional import cached_property
# wagtail
from wagtail.utils.widgets import WidgetWithScript
from wagtail.wagtailcore import blocks
@soar
soar / #README.md
Last active March 6, 2018 06:33 — forked from subfuzion/global-gitignore.md
Global gitignore

There are certain files created by particular editors, IDEs, operating systems, etc., that do not belong in a repository. But adding system-specific files to the repo's .gitignore is considered a poor practice. This file should only exclude files and directories that are a part of the package that should not be versioned (such as the node_modules directory) as well as files that are generated (and regenerated) as artifacts of a build process.

All other files should be in your own global gitignore file. Create a file called .gitignore in your home directory and add anything you want to ignore. You then need to tell git where your global gitignore file is.

Mac

git config --global core.excludesfile ~/.gitignore

Windows

git config --global core.excludesfile %USERPROFILE%\.gitignore