Skip to content

Instantly share code, notes, and snippets.

Avatar
🐙
https://youtu.be/TulBh6klMuU

General Zod olen2006

🐙
https://youtu.be/TulBh6klMuU
  • Solar System, Earth
View GitHub Profile
@velotiotech
velotiotech / download-consul-linux-64bit
Created Jun 11, 2020
Velotio - HashiCorp Consul Part 1 - Download Consul
View download-consul-linux-64bit
$ wget https://releases.hashicorp.com/consul/1.4.3/consul_1.4.3_linux_amd64.zip -O consul.zip
--2019-03-10 00:14:07-- https://releases.hashicorp.com/consul/1.4.3/consul_1.4.3_linux_amd64.zip
Resolving releases.hashicorp.com (releases.hashicorp.com)... 151.101.37.183, 2a04:4e42:9::439
Connecting to releases.hashicorp.com (releases.hashicorp.com)|151.101.37.183|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 34777003 (33M) [application/zip]
Saving to: ‘consul.zip’
consul.zip 100%[============================>] 33.17M 4.46MB/s in 9.2s
@arcanosam
arcanosam / install_Python381.sh
Last active Oct 29, 2020
my Python 3.8.1 build script on CentOS 7
View install_Python381.sh
#!/bin/bash
# original source/tip: https://www.workaround.cz/howto-compile-install-latest-python-37-38-centos-7-8/
wget https://www.python.org/ftp/python/3.8.1/Python-3.8.1.tgz -P /tmp/
tar xzfv /tmp/Python-3.8.1.tgz -C /tmp
cd /tmp/Python-3.8.1
@joshuaaguilar20
joshuaaguilar20 / my.cnf
Last active Jun 29, 2020
MariaDB 10:2 Server Config file
View my.cnf
root@c836246fc87c:/etc/mysql# cat my.cnf
# MariaDB database server configuration file.
#
# You can copy this file to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
@dansmith65
dansmith65 / Install-AWSCLI.ps1
Created Nov 9, 2018
Install latest version of AWS CLI via PowerShell
View Install-AWSCLI.ps1
# https://docs.aws.amazon.com/cli/latest/userguide/awscli-install-windows.html
$dlurl = "https://s3.amazonaws.com/aws-cli/AWSCLI64PY3.msi"
$installerPath = Join-Path $env:TEMP (Split-Path $dlurl -Leaf)
Invoke-WebRequest $dlurl -OutFile $installerPath
Start-Process -FilePath msiexec -Args "/i $installerPath /passive" -Verb RunAs -Wait
Remove-Item $installerPath
View gist:50254a27bfd4017dc504efbe8645f976
#!/bin/bash
mysql_secure_installation <<EOF
y
secret
secret
y
y
y
@shapeshed
shapeshed / aws-cf-logs
Last active Oct 9, 2020
Fetch AWS Cloudfront Logs, decompress, combine into a single file and remove comments
View aws-cf-logs
#!/usr/bin/env bash
BUCKET=$1
CWD=$(pwd)
if [[ -n $1 ]]; then
aws s3 sync s3://$BUCKET/cf-logs .
cat *.gz > combined.log.gz
find $CWD ! -name 'combined.log.gz' -name '*.gz' -type f -exec rm -f {} +
gzip -d combined.log.gz
@fevangelou
fevangelou / my.cnf
Last active Jan 19, 2021
Optimized my.cnf configuration for MySQL/MariaSQL (on Ubuntu, CentOS etc. servers)
View my.cnf
# Optimized my.cnf configuration for MySQL/MariaSQL
#
# by Fotis Evangelou, developer of Engintron (engintron.com)
#
# ~ Updated January 2020 ~
#
#
# The settings provided below are a starting point for a 2GB - 4GB RAM server with 2-4 CPU cores.
# If you have different resources available you should adjust accordingly to save CPU, RAM & disk I/O usage.
#
@wpsmith
wpsmith / Microsoft.PowerShell_profile.ps1
Created Jul 15, 2015
PowerShell: Profile to always launch PS as Administrator, set Aliases (ex. Notepad++), Import SharePoint Online, Azure AD, and Azure Services.
View Microsoft.PowerShell_profile.ps1
# Check if Running as Admin
$IsAdmin = ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")
if (-not $IsAdmin)
{
if ($MyInvocation.ScriptName -ne "")
{
try
{
Write-Host "Relanuching Script as Admin"
@alastairtree
alastairtree / gist:6777218c2c7facc17282
Created Jul 28, 2014
grant read execute permissions to a folder via powershell
View gist:6777218c2c7facc17282
$path = "C:\Sites\Website123"
$user = "domain\user"
$acl = Get-Acl $path
$arguments = $user, "ReadAndExecute", "ContainerInherit, ObjectInherit", "None", "Allow"
$accessRule = New-Object System.Security.AccessControl.FileSystemAccessRule $arguments
$acl.SetAccessRule($accessRule)
@sebdah
sebdah / template.json
Created Jun 24, 2014
EC2 Windows - Joining a domain via cfn-init
View template.json
"UserData" : { "Fn::Base64" : { "Fn::Join" : ["", [
"<powershell>\n",
"pip install -U cumulus-bundle-handler\n",
"# Join the AD domain\n",
"$password = \"MyPassW0rd\" | ConvertTo-SecureString -asPlainText -Force\n",
"$username = \"example.com\\username\"\n",
"$credential = New-Object System.Management.Automation.PSCredential($username,$password)\n",
"Add-Computer -domainname example.com -OUPath \"OU=Servers,OU=Resources,OU=ORGANIZATION,DC=example,DC=com\" -Credential $credential -passthru \n",
You can’t perform that action at this time.