Skip to content

Instantly share code, notes, and snippets.

View w0rldart's full-sized avatar

Al w0rldart

View GitHub Profile
@w0rldart
w0rldart / back-res.sh
Created March 23, 2012 18:24 — forked from zekus/back-res.sh
a backup script for ispconfig-3
#!/bin/bash
version="0.9.4 from 2010-09-13"
# Always download the latest version here: http://www.eurosistems.ro/back-res
# Thanks or questions: http://www.howtoforge.com/forums/showthread.php?t=41609
#
# CHANGELOG:
# -----------------------------------------------------------------------------
# version 0.9.4 - 2010-09-13
# --------------------------
# Small fix: - Corrected small bug replaced tar with $TAR in the recovery line
@w0rldart
w0rldart / services-action.sh
Created April 19, 2012 13:48
Get site status with CURL and invoke services action (restart, stop)
#!/bin/bash
## ./services-action.sh restart => To restart all the services
## ./services-action.sh restart postfix => To restart specific service (postfix in this case)
initPath="/etc/init.d/"
services="apache2,mysql,amavis,postfix,courier-authdaemon,courier-imap,courier-imap-ssl,courier-pop,courier-pop-ssl"
export IFS=","
if [ $# -lt 1 ]; then
@w0rldart
w0rldart / logs.sql
Last active December 15, 2015 02:59
logs database for my apps
--
-- Database: `logs`
--
DROP DATABASE `logs`;
CREATE DATABASE `logs` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
USE `logs`;
-- --------------------------------------------------------
@w0rldart
w0rldart / System Design.md
Created April 22, 2016 09:33 — forked from vasanthk/System Design.md
System Design Cheatsheet

#System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

##Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@w0rldart
w0rldart / swarm.sh
Created January 20, 2017 10:20
Create a cluster of Docker Engines, a.k.a a swarm
#!/bin/sh
###
## Virtual box options
###
export VIRTUALBOX_CPU_COUNT='1'
export VIRTUALBOX_DISK_SIZE='10000'
export VIRTUALBOX_MEMORY_SIZE='512'
swarm_workers=2
@w0rldart
w0rldart / update-repos.sh
Last active August 29, 2017 12:17
Update all git repositories in a directory
for dir in `ls -d */`; do BASE_PATH=`pwd`; DIR_PATH=$BASE_PATH/$dir; cd $DIR_PATH; git pull; cd ../ ; done
@w0rldart
w0rldart / README.md
Last active January 29, 2018 11:38
Useful aws cli commands

Compilation of useful AWS CLI commands that I accumulate over time

Don't forget to export AWS_DEFAULT_PROFILE=MyMagicalAWSProfile :)

@w0rldart
w0rldart / trick.md
Created July 18, 2018 20:13
wp cli with increased memory_limit

If you get the following error when running wp command

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 12288 bytes) in ....

You can overcome that the following way

php -d memory_limit=256M /usr/bin/wp
* alicloud_ess_alarm.alarm_up: CreateAlarm got an error: &errors.ServerError{httpStatus:400, requestId:"xxxx-xxxx",
hostId:"ess.eu-central-1.aliyuncs.com", errorCode:"InvalidParameter", recommend:"",
message:"The specified value of parameter \"MetricName\" is not valid.", comment:""}.