Skip to content

Instantly share code, notes, and snippets.

View skounis's full-sized avatar

Stavros Kounis skounis

View GitHub Profile
@skounis
skounis / ramdisk.sh
Created May 13, 2020 14:45
Create a ram disk in my home
# https://linuxhint.com/ramdisk_ubuntu_1804/
mkdir ~/ramdisk
mount -t tmpfs -o rw,size=2G tmpfs ~/ramdisk
@skounis
skounis / prune-local.sh
Last active May 9, 2020 11:22
Git prune local branches
git fetch origin --prune
git checkout master
git branch -vv | grep ': gone]' | awk '{print $1}' | xargs git branch -d
@skounis
skounis / readme.md
Created January 9, 2020 14:34 — forked from oliveratgithub/readme.md
Configure the PHP CLI in macOS to use MAMP PHP binaries

Pre-requisites

Find MAMP's installed PHP version(s) you want to use the PHP CLI for:

$ ls -l /Applications/MAMP/bin/php/

Configure PHP CLI in macOS to use MAMP's PHP

  1. First, open your local user's .bash_profile in edit mode, in order to add aliases for accessing the PHP CLI locally
$ pico ~/.bash_profile
@skounis
skounis / docker-cleanup.sh
Created January 2, 2020 08:56
Stop and Remove all Docker containers. Clean up
docker container stop $(docker container ls -aq)
docker container rm $(docker container ls -aq)
docker system prune --volumes
@skounis
skounis / hash.md
Last active December 30, 2019 19:07
Drupal - The hash (#) in the the render array plus theme notes
@skounis
skounis / open-chrome.sh
Created December 20, 2019 16:43
Open Chrome with the security settings disabled
open -n -a /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --args --user-data-dir="/tmp/chrome_dev_test" --disable-web-security
@skounis
skounis / mamp-path.sh
Created October 29, 2019 06:29
MAMP add mysql command in the path
export PATH=$PATH:/Applications/MAMP/Library/bin
@skounis
skounis / live.css
Last active October 16, 2019 08:19
Drupalizing Demos Menu - Live CSS
/*
* MT Demos Menu styles
* Add any module related style here
*/
.mt_demosmenu {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
justify-content: space-evenly;
align-items: stretch;
@skounis
skounis / drupal-8.7.8.skeleton.po
Last active October 11, 2019 15:42
Drupal Core PO skeleton
# French translation of Drupal core (8.7.8)
# Copyright (c) 2019 by the French translation team
#
msgid ""
msgstr ""
msgid "Forms"
msgstr ""
msgid "Home"
msgstr ""
@skounis
skounis / dump-all.sh
Created September 18, 2019 11:11
Export / Dump all the MySQL database
#!/bin/bash
USER="root"
PASSWORD="root"
#OUTPUT="/Users/rabino/DBs"
#rm "$OUTPUTDIR/*gz" > /dev/null 2>&1
databases=`mysql -u $USER -p$PASSWORD -e "SHOW DATABASES;" | tr -d "| " | grep -v Database`