Skip to content

Instantly share code, notes, and snippets.

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

Growtopia Jaw growtopiajaw

🏠
Working from home
  • gjaw.duckdns.org
  • Malaysia
View GitHub Profile
@growtopiajaw
growtopiajaw / zip2tgz.sh
Last active December 29, 2018 15:37 — forked from natemcmaster/zip2tgz.sh
Convert zip to tar.gz file
#!/usr/bin/env bash
if [[ $# < 2 ]]; then
echo "Usage: [src] [dest]"
exit 1
fi
function realpath() {
[[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"
}
@growtopiajaw
growtopiajaw / wp-disable-plugin-update.php
Created April 19, 2019 01:06 — forked from ebetancourt/wp-disable-plugin-update.php
WordPress - Disable specific plugin update check
<?php
// have to add that opening tag to get syntax highlighting... ¯\_(ツ)_/¯
/**
* Prevent update notification for plugin
* http://www.thecreativedev.com/disable-updates-for-specific-plugin-in-wordpress/
* Place in theme functions.php or at bottom of wp-config.php
*/
function disable_plugin_updates( $value ) {
@growtopiajaw
growtopiajaw / fix-wordpress-permissions.sh
Last active May 17, 2019 23:15 — forked from Adirael/fix-wordpress-permissions.sh
Fix wordpress file permissions
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org>
#
WP_OWNER=daemon # <-- wordpress owner
WP_GROUP=daemon # <-- wordpress group
WP_ROOT=./ # <-- wordpress root directory
@growtopiajaw
growtopiajaw / ova-gen.sh
Last active July 26, 2019 10:43 — forked from ewascent/ova-gen.sh
Convert VMDK to OVA using VirtualBox
#!/bin/sh
#
# http://jbrazile.blogspot.com.es/2012/01/scripted-vmdkova-images-wboxgrinder-and.html
#
NAME=$1
OS=$2
IMAGE=
SZMB=384
INSTDIR=/tmp/ova-gen/boxes
BUILDDIR=/tmp/ova-gen/builds
@growtopiajaw
growtopiajaw / macOS-in-virtualbox.md
Created October 27, 2019 07:48 — forked from rob-smallshire/macOS-in-virtualbox.md
Notes on getting macOS Sierra running in Virtualbox on a Windows 10 host

On Mac

Download, but don't run, the Sierra installer from the Mac App Store. This places the installer at /Applications/Install\ macOS\ Sierra.app/.

Now run the following commands to build a suitable VM image from the installer:

git clone https://github.com/jonanh/osx-vm-templates
cd osx-vm-templates/packer

sudo ../prepare_iso/prepare_vdi.sh -D DISABLE_REMOTE_MANAGEMENT -o macOS_10.12.vdi /Applications/Install\ macOS\ Sierra.app/ .

@growtopiajaw
growtopiajaw / gist:961dec0e5f11600b0e84309972b05092
Created May 23, 2024 09:08 — forked from phainamikaze/gist:82a57d398e37da2e7f24fb1037420f66
Alibaba Cloud Tech Share – Install Cloud Hosted Router (CHR) RouterOS MikroTik
Minimal requirements:
64bit CPU with virtualization support
128 MB or more RAM for the CHR instance
128 MB disk space for the CHR virtual hard drive
You can use Elastic Compute Engine Starter Package Plan/ Entry Level Using Ubuntu 16.04 64bit
1. Open Putty, Login to your ECS using IP address root. (SSH port 22)
2. Paste this script to your terminal
wget https://download2.mikrotik.com/routeros/6.40.5/chr-6.40.5.img.zip -O chr.img.zip && \