Skip to content

Instantly share code, notes, and snippets.

View arkka's full-sized avatar

Arkka Dhiratara arkka

View GitHub Profile
@arkka
arkka / sysctl.conf
Created March 15, 2017 09:28
IMPROVE SYSTEM MEMORY MANAGEMENT
# /etc/sysctl.conf
### IMPROVE SYSTEM MEMORY MANAGEMENT ###
# Increase size of file handles and inode cache
fs.file-max = 2097152
# Do less swapping
vm.swappiness = 10
vm.dirty_ratio = 60
vm.dirty_background_ratio = 2
@arkka
arkka / upgrade.py
Last active November 17, 2020 21:39
Upgrade service via Rancher API using python
import os
import requests
import json
import time
environmentName = 'some-env'
serviceName = 'some-service'
newImage = 'docker:arkka/some-image:tag'
# Find stack based on their name
@arkka
arkka / docker-compose.yml
Last active August 25, 2016 14:43
Rancher convoy-nfs with dockerized NFS server as storage pool
convoy-nfs-storagepool:
labels:
io.rancher.container.create_agent: 'true'
io.rancher.scheduler.affinity:host_label: nfs-server=true
command:
- storagepool-agent
image: rancher/convoy-agent:v0.9.0
volumes:
- /var/run:/host/var/run
- /run:/host/run
@arkka
arkka / readme.md
Created August 18, 2016 11:39 — forked from coolaj86/how-to-publish-to-npm.md
How to publish packages to NPM

Getting Started with NPM (as a developer)

If you haven't already set your NPM author info, now you should:

npm set init.author.name "Your Name"
npm set init.author.email "you@example.com"
npm set init.author.url "http://yourblog.com"

npm adduser

@arkka
arkka / wait_on_update.sh
Created August 11, 2016 01:11
Bash script wait/listen from http conditional
echo "Waiting for startup.."
until curl http://${MONGODB1}:28017/serverStatus\?text\=1 2>&1 | grep uptime | head -1; do
printf '.'
sleep 1
done