Skip to content

Instantly share code, notes, and snippets.

Avatar
Go Phillies!

Tim Ski marshyski

Go Phillies!
View GitHub Profile
@marshyski
marshyski / yum-nginx-api-v1-proposal.md
Last active Jun 21, 2020
yum-nginx-api 2020 v1 proposal
View yum-nginx-api-v1-proposal.md

Move API routes:

Old New
/api/health /v1/health
/api/upload /v1/rpm/upload /v1/deb/upload
/api/repo /v1/rpm/repo /v1/deb/repo

/rep will default to a single repo/xml directory. The goal would be manage multiple repos by utlizing a name query parameter as such:

@marshyski
marshyski / Windows 10 Gaming Performance.md
Last active Nov 10, 2020
Windows 10 Gaming Optimizations
View Windows 10 Gaming Performance.md

Windows 10 Gaming Performance

Tested On: MSI GS66 Stealth 10SFS-037 Laptop | Intel i7-10750H | Nvidia RTX 2070 Super

Date Updated: 28JUN2020

Est. Time to Completion: 1 hour

Expected improvement from stock Windows 10 install for gaming is 1-3x network improvement and reduction in OS overhead.

View mac-setup.md
View goss.yaml
file:
/bin/aws:
exists: true
owner: root
group: root
linked-to: /usr/share/aws/bin/aws
filetype: symlink
/var/awslogs/bin/awslogs-agent-launcher.sh:
exists: true
mode: "0755"
View Vagrantfile-proxy
# -*- mode: ruby -*-
# vi: set ft=ruby :
$script = <<SCRIPT
export http_proxy=#{ENV['http_proxy']}
export https_proxy=#{ENV['https_proxy']}
export HTTP_PROXY=#{ENV['http_proxy']}
export HTTPS_PROXY=#{ENV['https_proxy']}
echo "export http_proxy=#{ENV['http_proxy']}" > /etc/profile.d/proxy.sh
echo "export https_proxy=#{ENV['https_proxy']}" >> /etc/profile.d/proxy.sh
View flaskdeploy.conf
server {
listen 80;
server_name 54.213.202.21;
location ~ /(.git|.svn|README.md) {
deny all;
log_not_found off;
access_log off;
return 404;
}
View gunicorn.sh
#!/bin/bash
NAME=project
WORKERS=`lscpu | grep ^'CPU(s)' | awk '{ print $2 }'`
DEPLOY_DIR=./
if [[ `grep ^nginx /etc/passwd` = "" ]]; then
if [[ `grep ^www-data /etc/passwd` = "" ]]; then
GUN_USER=$USER
fi
@marshyski
marshyski / lua-randoms.sh
Created May 12, 2016
Random Lua installs
View lua-randoms.sh
luarocks install lua-requests CRYPTO_INCDIR='/usr/local/Cellar/openssl/1.0.2g/include' OPENSSL_INCDIR='/usr/local/Cellar/openssl/1.0.2g/include'
@marshyski
marshyski / luajit-luarocks-osx.sh
Last active Mar 20, 2019
LuaJIT and luarocks on Mac OS X El Capitan
View luajit-luarocks-osx.sh
# This is to install both on OS X if you don't want to use homebrew
# xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
xcode-select --install
curl -O http://luajit.org/download/LuaJIT-2.0.4.zip
unzip LuaJIT-2.0.4.zip
cd LuaJIT-2.0.4
make && make install
curl -O http://keplerproject.github.io/luarocks/releases/luarocks-2.3.0.tar.gz
@marshyski
marshyski / sqs-reader.py
Created Apr 21, 2016
Just a simple SQS reader
View sqs-reader.py
import boto.sqs
import time
conn = boto.sqs.connect_to_region("us-east-1")
q = conn.create_queue("myqueue")
while(True):
for m in q.get_messages():
print m.get_body()
q.delete_message(m)