Skip to content

Instantly share code, notes, and snippets.

View firestar's full-sized avatar
🏠
Working from home

Nathaniel Davidson firestar

🏠
Working from home
View GitHub Profile
Invoke-WebRequest `
https://s3.amazonaws.com/ec2-downloads-windows/SSMAgent/latest/windows_amd64/AmazonSSMAgentSetup.exe `
-OutFile $env:USERPROFILE\Desktop\SSMAgent_latest.exe
Start-Process `
-FilePath $env:USERPROFILE\Desktop\SSMAgent_latest.exe `
-ArgumentList "/S"
rm -Force $env:USERPROFILE\Desktop\SSMAgent_latest.exe
yum update -y
yum install -y epel-release
yum update -y
yum install -y containerd
systemctl enable --now containerd
cat <<EOF > /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
echo "██████╗ ██████╗ ██████╗██╗ ██╗███████╗██████╗ "
echo "██╔══██╗██╔═══██╗██╔════╝██║ ██╔╝██╔════╝██╔══██╗"
echo "██║ ██║██║ ██║██║ █████╔╝ █████╗ ██████╔╝"
echo "██║ ██║██║ ██║██║ ██╔═██╗ ██╔══╝ ██╔══██╗"
echo "██████╔╝╚██████╔╝╚██████╗██║ ██╗███████╗██║ ██║"
echo "╚═════╝ ╚═════╝ ╚═════╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝"
echo " "
yum remove -y docker \
docker-client \
version: '2'
services:
neo4jDB:
privileged: true
image: nucleoteam/neo4j-cluster:latest
hostname: neo1
environment:
CLUSTER_NODES: neo1
SERVER_ID: '1'
stdin_open: true
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: neo4j-ingress-controller
namespace: neo4j
---
apiVersion: v1
kind: PersistentVolume
metadata:
echo "#######################################################################################################"
echo "#######################################################################################################"
echo "################# Installing Kubernetes ########################"
echo "#######################################################################################################"
echo "#######################################################################################################"
echo "Installing container selinux 2.28-1 from \"rpmfind.net\""
yum install libtool-ltdl.x86_64 policycoreutils libseccomp.x86_64 -y
cd /tmp
curl https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch.rpm -o docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch.rpm
rpm -Uvh docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch.rpm
@firestar
firestar / backup.sh
Last active March 28, 2024 16:14
MySQL Backup to Google Drive (requires gdrive)
#!/bin/bash
# backup Path
BACKUP_PATH="./mysql"
# database settings
DB_NAME=$1
DB_USER="user"
DB_PASS="password"
try {
if(Category._find(Category.class, "").exec(Category.class).size()==0){
Log.info("Created default category!", this.getClass());
Category c = new Category("title","Welcome","description","welcome message");
c._insert();
Entry e = new Entry(
"title", "Hello World!",
"body", "Welcome to my new blog. I am still setting everything up, please be patient!",
"publicPost", 1,
"date", System.currentTimeMillis() / 1000
@firestar
firestar / envylineck
Created July 5, 2012 18:31
Lines of code in scripts
<?php
$intoVAT = array("/var/path/to/script");
function read_dir($dir, $array = array()){
$dh = opendir($dir);
$files = array();
while (($file = readdir($dh)) !== false) {
$flag = false;
if($file !== '.' && $file !== '..' && is_dir($dir."/".$file)) {
$files[] = $dir."/".$file;
$files = array_merge(read_dir($dir."/".$file),$files);