Skip to content

Instantly share code, notes, and snippets.

View tiwiex's full-sized avatar

Taiwo Akinosho tiwiex

View GitHub Profile
#!/bin/sh
# size of swapfile in megabytes
swapsize=4096
# does the swap file already exist?
grep -q "swapfile" /etc/fstab
# if not then create it
if [ $? -ne 0 ]; then
@tiwiex
tiwiex / create_swap.sh
Created June 11, 2021 07:47 — forked from garystafford/create_swap.sh
From my blog post, Scripting Linux Swap Space: Scripting Linux Swap Space
#!/bin/sh
# size of swapfile in megabytes
swapsize=512
# does the swap file already exist?
grep -q "swapfile" /etc/fstab
# if not then create it
if [ $? -ne 0 ]; then
@tiwiex
tiwiex / bash-to-zsh-hist.py
Created September 22, 2017 17:28 — forked from muendelezaji/bash-to-zsh-hist.py
Convert Bash history to Zsh history
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# This is how I used it:
# $ cat ~/.bash_history | python bash-to-zsh-hist.py >> ~/.zsh_history
import sys
import time
Using the Drush script found at /home/applemed/drush using pcntl_exec
Phar detected. Proceeding to drush_main().
Cache HIT cid: 8.1.9-commandfiles-0-9ebe5dc8b18a411f1c4341cb010a4ad3 [0.02 sec, 2.22 MB] [debug]
Bootstrap to phase 0. [0.27 sec, 5.45 MB] [bootstrap]
Bootstrap to phase 6. [0.27 sec, 5.45 MB] [bootstrap]
Command pm-list needs a higher bootstrap level to run - you will need to invoke drush from a more functional Drupal environment to [error]
run this command. [0.27 sec, 5.45 MB]
The drush command 'pml' could not be executed. [0.27 sec, 5.45 MB]
root@panel:/home/applemedx/public_html# drush8 pml
Command pm-list needs a higher bootstrap level to run - you will need to invoke drush from a more functional Drupal environment to [error]
run this command.
The drush command 'pml' could not be executed.
drush8 on drupal 8
PHP configuration : /etc/php5/cli/php.ini
PHP OS : Linux
Drush script : /home/applemedx/drush
Drush version : 8.1.9