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 | |
main() { | |
sudo apt-get update \ | |
&& sudo apt-get install \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
gnupg \ | |
lsb-release \ |
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 | |
# Run this remotely: | |
# curl -fsSL https://gist.githubusercontent.com/niclaslindstedt/cc22b56774475f4345dc9c6f129136a0/raw/7f19198ca1970f9168ea29cb9cb4035793b5a09b/generate_ssh_key.sh | bash - | |
main() { | |
local gh_email ssh_key_path answer | |
ssh_key_path="$HOME/.ssh/id_ed25519" |
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
# Add this in /etc/ssh/sshd_config.d/00-hardening.conf | |
# Then type sudo service sshd reload | |
Protocol 2 | |
Port 2222 | |
PermitRootLogin no | |
MaxAuthTries 3 | |
LoginGraceTime 20 | |
PasswordAuthentication no |
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
root = true | |
[*] | |
charset = utf-8 | |
end_of_line = lf | |
indent_style = space | |
insert_final_newline = true | |
[*.yml] | |
indent_size = 2 |
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: Release | |
on: | |
push: | |
branches: [ master ] | |
jobs: | |
create_release: | |
name: create release | |
runs-on: ubuntu-latest |
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
{ | |
"scripts": { | |
"postinstall": "husky install" | |
}, | |
"devDependencies": { | |
"@commitlint/cli": "^11.0.0", | |
"@commitlint/config-conventional": "^11.0.0", | |
"husky": "^4.3.5" | |
}, | |
"commitlint": { |
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
# Auto-detect text files | |
* text=auto eol=lf | |
# Whitespace exclusions | |
*.txt whitespace=-blank-at-eof,-space-before-tab,-tab-in-indent,trailing-space,tabwidth=2 | |
*.md whitespace=-blank-at-eof,-space-before-tab,-tab-in-indent,trailing-space,tabwidth=2 | |
*.js whitespace=-blank-at-eof,-space-before-tab,-tab-in-indent,trailing-space,tabwidth=2 | |
*.ts whitespace=-blank-at-eof,-space-before-tab,-tab-in-indent,trailing-space,tabwidth=2 | |
*.json whitespace=-blank-at-eof,-space-before-tab,-tab-in-indent,trailing-space,tabwidth=2 |
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
<# | |
.SYNOPSIS | |
Replace tokens in a file with values. | |
.DESCRIPTION | |
Finds tokens in a given file and replace them with values. It is best used to replace configuration values in a release pipeline. | |
.PARAMETER InputFile | |
The file containing the tokens. |
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
# Set IP-address | |
New-NetIPAddress -InterfaceAlias "Ethernet" -IPAddress "192.168.1.200" -AddressFamily IPv4 -PrefixLength 24 -DefaultGateway 192.168.1.1 | |
# Set DNS server | |
Set-DnsClientServerAddress -InterfaceAlias "Ethernet" -ServerAddresses 1.1.1.1,1.0.0.1 | |
# Allow remote connections | |
Set-Item WSMAN:\localhost\Client\TrustedHosts -value RemoteComputerName -force | |
# Create AD forest |
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
; Start Program | |
; If Program is already started, maximize and focus its window. | |
; If Program is started but minimized, maximize it. | |
; If Program is not started, start it. | |
ActivateProgram(name, executable, path) | |
{ | |
Process,Exist,%executable% | |
If Errorlevel != 0 ;Errorlevel returns pid of process | |
{ |
NewerOlder