By default MariaDB use the unix_socket
plugin to authenticate users.
But it's easier to use mysql_native_password
for dev (and only for dev because it's way less secure).
Get root access
sudo su
CREATE USER 'username'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'; | |
ALTER USER 'username'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'; | |
GRANT ALL PRIVILEGES ON *.* TO 'username'@'localhost'; | |
FLUSH PRIVILEGES; | |
-- Reference: https://www.digitalocean.com/community/tutorials/how-to-create-a-new-user-and-grant-permissions-in-mysql |
version: '3.8' | |
services: | |
nginx: | |
image: nginx:1.21 | |
ports: | |
- "8000:80" | |
volumes: | |
- .:/var/www/html | |
- ./site.conf:/etc/nginx/conf.d/default.conf |
I use separate Firefox profiles for work and personal stuff. To distinguish those I place them on different workspaces.
firefox --no-remote -P MyJob
firefox --no-remote -P default
I have also company Slack on Workspace 0. Which usually contains links to some work stuff.
#!/bin/bash | |
set -e | |
export CONFIG_MODULE_SIG=n | |
export CONFIG_MODULE_SIG_ALL=n | |
# For current kernel | |
export KERNELRELEASE=$(cat /proc/version | awk '{print $3}') | |
temp_dir=$(mktemp -d) | |
echo "Installing FacetimeHD camera for $KERNELRELEASE" |
CREATE USER 'mul14'@'localhost' IDENTIFIED BY 'secret_password'; | |
GRANT ALL PRIVILEGES ON *.* TO 'mul14'@'localhost' WITH GRANT OPTION; | |
FLUSH PRIVILEGES; |
function graphql_query(endpoint, query, variables = {}, token = null) { | |
return new Promise((resolve, reject) => { | |
const headers = { | |
'Content-Type': 'application/json', | |
} | |
if (token) { | |
headers['Authorization'] = `Bearer ${token}` | |
} |
/* | |
Have the function | |
ArithGeo(arr) | |
take the array of numbers stored in | |
arr | |
and return the string | |
"Arithmetic" | |
if the sequence follows an arithmetic pattern or return | |
"Geometric" | |
if it follows a geometric pattern. If the sequence doesn't follow either pattern return |
#!/bin/bash | |
demo () { | |
project_name="" | |
if [ $# -eq 0 ]; then | |
project_name=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 6 | head -n 1) | |
else | |
if [[ ( $1 == "--help") || $1 == "-h" ]]; then | |
cat << EOF |
/* ~/Library/KeyBindings/DefaultKeyBinding.Dict | |
This file remaps the key bindings of a single user on Mac OS X 10.5 to more | |
closely match default behavior on Windows systems. This makes the Command key | |
behave like Windows Control key. To use Control instead of Command, either swap | |
Control and Command in Apple->System Preferences->Keyboard->Modifier Keys... | |
or replace @ with ^ in this file. | |
Here is a rough cheatsheet for syntax. | |
Key Modifiers |