Skip to content

Instantly share code, notes, and snippets.

View dapi's full-sized avatar
🌴
Open for offers

Danil Pismenny dapi

🌴
Open for offers
View GitHub Profile
@dapi
dapi / ssh_key_distribution.sh
Created May 13, 2024 08:13
Copy ssh public key to all AWS instances
aws ec2 describe-instances --query 'Reservations[*].Instances[*].{Instance:InstanceId,AvailabilityZone:Placement.AvailabilityZone}' --region us-east-1 | \
jq -r '.[] | map({Instance,AvailabilityZone}) | (first | keys_unsorted) as $$keys | map([to_entries[] | .value]) as $$rows | $$keys,$$rows[] | @tsv' | \
grep -v Instance | \
awk '{print "--instance-id", $1, "--availability-zone", $2}' | \
xargs -I@ bash -c "AWS_PAGER= aws ec2-instance-connect send-ssh-public-key --region us-east-1 @ --instance-os-user ec2-user --ssh-public-key file://~/.ssh/id_rsa.pub"
server 192.168.255.0 255.255.255.0
ca /etc/ipa/ca.crt
cert server_freeipa.crt
key server_freeipa.key
dh /etc/openvpn/dh.pem
proto udp
## Rely on Docker to do port mapping, internally always 1194
module I18n
extend CurrentVendor
# Implemented to support method call on translation keys
INTERPOLATION_WITH_METHOD_PATTERN = Regexp.union(
/%%/,
/%\{(\w+)\}/, # matches placeholders like "%{foo}"
/%<(\w+)>(.*?\d*\.?\d*[bBdiouxXeEfgGcps])/, # matches placeholders like "%<foo>.d"
/%\{(\w+)\.(\w+)\}/ # matches placeholders like "%{foo.upcase}"
)
- hosts: user_systemd
tasks:
- name: Create users systemd subdirectories
become: yes
become_user: "{{ app_user }}"
file:
path: "/home/{{ app_user }}/.config/systemd/user"
state: directory
mode: 0775
- hosts: all
tasks:
- name: Create users systemd subdirectories
become: yes
become_user: "{{ app_user }}"
file:
path: "/home/{{ app_user }}/.config/systemd/user"
state: directory
mode: 0775
[Eth]
NetworkId = 56
NoPruning = false
NoPrefetch = false
LightPeers = 100
UltraLightFraction = 75
TrieTimeout = 100000000000
EnablePreimageRecording = false
EWASMInterpreter = ""
EVMInterpreter = ""
@dapi
dapi / head.html
Last active October 29, 2020 08:07 — forked from klondaiker/head.html
<html>
<head>
<meta content="v2.5.0" name="kiosk_version">
<meta content="constructor-app1" name="response_server">
<meta charset="utf-8">
<meta name="csrf-param" content="authenticity_token">
<meta name="csrf-token" content="1phb2sw63JbThGKYa9No8czwr6sfU6JBVpkv3QMaLYZHIKtVADDeTEy4Ec3pxZu4y7jRukOxHKb5+a4Q2dibQg==">
<title>constructor.avalab.io: Cash &amp; Bank Accounts</title>
<link rel="shortcut icon" link="/images/fallback/favicon.ico">
<link rel="apple-touch-icon" sizes="57x57" link="/images/fallback/apple-touch-icon-57x57.png">
## mysqldiff 0.50
##
## Run on Wed Oct 21 18:42:45 2020
## Options: tolerant, debug=0
##
## --- db: wordpress_reproduction
## +++ db: test_wordpress
ALTER TABLE aej_bwf_actions CHANGE COLUMN recurring_interval recurring_interval int(11) NOT NULL DEFAULT '0'; # was int(10) NOT NULL DEFAULT '0'
ALTER TABLE aej_bwf_actions CHANGE COLUMN status status int(11) NOT NULL DEFAULT '0' COMMENT '0 - Pending | 1 - Running'; # was int(1) NOT NULL DEFAULT '0' COMMENT '0 - Pending | 1 - Running'
CREATE TABLE `epg` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`timestart` timestamp NULL DEFAULT NULL,
`timestop` timestamp NULL DEFAULT NULL,
`title` varchar(256) DEFAULT NULL,
`desc` text,
`epg_id` int(11) DEFAULT NULL,
`date` date DEFAULT NULL,
`cdnvideo` tinyint(1) DEFAULT '0',
`rating` smallint(6) DEFAULT NULL,
create_table "epg", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t|
t.timestamp "timestart"
t.timestamp "timestop"
t.string "title", limit: 256
t.text "desc"
t.integer "epg_id"
t.date "date"
t.boolean "cdnvideo", default: false
t.integer "rating", limit: 2
t.integer "director_id"