mkdir -m 700 ~/.ssh; curl https://github.com/aidik.keys >> ~/.ssh/authorized_keys
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import ntpath | |
| import argparse | |
| from ftplib import FTP | |
| def upload_file(host, port, | |
| username, password, | |
| file_path, remote_path): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| apiVersion: v1 | |
| kind: PersistentVolumeClaim | |
| metadata: | |
| name: etcd-backup | |
| namespace: kube-system | |
| spec: | |
| accessModes: | |
| - ReadWriteOnce | |
| volumeMode: Filesystem |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| import base64 | |
| from getpass import getpass | |
| def create_secret_yaml(secret_name, **kwargs): | |
| """ | |
| Create k8s Secret Yaml with key: value | |
| Value must already be base64 encoded and in utf-8 encoded bytes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| - name: Setup Docker engine with specific configuration and secure TCP socket | |
| hosts: all | |
| become: yes | |
| vars: | |
| ca_key: /etc/docker/ssl/ca-key.pem | |
| ca_cert: /etc/docker/ssl/ca.pem | |
| server_key: /etc/docker/ssl/server-key.pem | |
| server_cert: /etc/docker/ssl/server-cert.pem | |
| client_key: /etc/docker/ssl/client-key.pem |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| install_deps_windows() { | |
| echo "Installing Build Dependencies (Windows)..." | |
| choco install -y make visualstudio2019buildtools visualstudio2019-workload-vctools | |
| } | |
| install_deps_darwin() { | |
| echo "Installing Build Dependencies (Darwin)..." | |
| xcode-select --install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| install_deps_windows() { | |
| echo "Installing Build Dependencies (Windows)..." | |
| choco install -y make visualstudio2019buildtools visualstudio2019-workload-vctools | |
| } | |
| install_deps_darwin() { | |
| echo "Installing Build Dependencies (Darwin)..." | |
| xcode-select --install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CREATE TABLE IF NOT EXISTS `country` ( | |
| `id` int(11) NOT NULL AUTO_INCREMENT, | |
| `iso` char(2) NOT NULL, | |
| `name` varchar(80) NOT NULL, | |
| `nicename` varchar(80) NOT NULL, | |
| `iso3` char(3) DEFAULT NULL, | |
| `numcode` smallint(6) DEFAULT NULL, | |
| `phonecode` int(5) NOT NULL, | |
| PRIMARY KEY (`id`) | |
| ) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| goto ExecutePowershell | |
| cls | |
| #Powershell code block begining | |
| #LINK http://www.bryanvine.com/2016/02/powershell-quick-script-wrap-any.html | |
| 0..2 | %{ | |
| "Loop: $($_+1)" | |
| [System.Console]::Beep(450, 110);[System.Console]::Beep(500, 110);[System.Console]::Beep(550, 110);[System.Console]::Beep(450, 110) | |
| [System.Console]::Beep(675, 200);[System.Console]::Beep(675, 200);[System.Console]::Beep(600, 300);[System.Console]::Beep(450, 110) | |
| [System.Console]::Beep(500, 110);[System.Console]::Beep(550, 110);[System.Console]::Beep(450, 110);[System.Console]::Beep(600, 200) | |
| [System.Console]::Beep(600, 200);[System.Console]::Beep(550, 300);[System.Console]::Beep(525, 110);[System.Console]::Beep(450, 300) |
In addition, substitution of FOR variable references has been enhanced. You can now use the following optional syntax:
%~I - expands %I removing any surrounding quotes (")
%~fI - expands %I to a fully qualified path name
%~dI - expands %I to a drive letter only
%~pI - expands %I to a path only
%~nI - expands %I to a file name only
%~xI - expands %I to a file extension only
%~sI - expanded path contains short names only
%~aI - expands %I to file attributes of file