This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# MYSQL WORKBENCH installation | |
# download archive version for Ubuntu 16.04 from | |
# https://downloads.mysql.com/archives/workbench/ | |
# running | |
sudo dpkg -i mysql-workbench-community-6.3.10-1ubuntu16.04-amd64.deb | |
# throws error | |
(Reading database ... 278976 files and directories currently installed.) | |
Preparing to unpack mysql-workbench-community-6.3.10-1ubuntu16.04-amd64.deb ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Prints permissions in octal format | |
# perms filename.jpg | |
# perms * | |
alias perms='stat -c "%a %n"' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# USAGE | |
# bash bulk-image-process.sh [path/to/images] | |
# current exec folder is used as destination | |
destination_dir=$(pwd) | |
source_dir=$1 | |
for photo in $source_dir/*.jpg; | |
do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# use: "bash bulk_dir_rename.sh path" | |
source_dir=$1 | |
for found_dir in $source_dir/*; | |
do | |
original_dir_name=$(basename "${found_dir}") | |
lowercase_name=${original_dir_name,,} | |
no_space_dir=$(echo "$lowercase_name" | sed -e 's/ /_/g') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ALBERT A fast and flexible keyboard launcher | |
## installation taken from | |
## https://software.opensuse.org//download.html?project=home%3Amanuelschneid3r&package=albert | |
## For xUbuntu 18.04 run the following | |
echo 'deb http://download.opensuse.org/repositories/home:/manuelschneid3r/xUbuntu_18.04/ /' | sudo tee /etc/apt/sources.list.d/home:manuelschneid3r.list | |
curl -fsSL https://download.opensuse.org/repositories/home:manuelschneid3r/xUbuntu_18.04/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/home_manuelschneid3r.gpg > /dev/null | |
sudo apt update | |
sudo apt install albert |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Prints out time the specified method takes to run. | |
* Just need to add a bunch of files in your specified directory | |
* | |
* From console: php index.php [name_of_method] (ex: php index.php runiterator) | |
* From web request: go to http://yourdomain.test/?test=[name_of_method] (ex: http://yourdomain.test/?test=runglob) | |
* | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Postman script to automatically get token and assign it to environment variable | |
* - Create new endpoint (GET, POST, etc) | |
* - Create an env variable called "access_token" | |
* - Add this script in Tests tab in Postman for your newly created endpoint | |
* - To debug you can use Postman Console (Alt + Ctrl + C) | |
*/ | |
const tokenUrl = 'https://mywebsite.com/auth/token'; | |
const apiKey = "123FJSKAHFSAJFHSAFKJSAFHASSAFA"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# 2. install ffmpeg on Ubuntu 18.04 | |
# https://linuxize.com/post/how-to-install-ffmpeg-on-ubuntu-18-04/ | |
# | |
sudo apt update | |
sudo apt install ffmpeg | |
ffmpeg -version | |
# | |
# 1. install audacity on Ubuntu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App; | |
use PHPMailer\PHPMailer\PHPMailer; | |
use PHPMailer\PHPMailer\SMTP; | |
class Mailer | |
{ | |
private $client; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# PHP COMPATIBILITY CHECK | |
# PHP CODE SNIFFER (with compatibility 7.4) | |
docker run --rm -v $(pwd):/app vfac/php7compatibility 7.4 [folder or file path] --extensions=php --ignore=vendor | |
# ------- | |
# PHPSTAN (with .neon configs) |