- Website pre & post launch checklist
- Oh Shit Git - A list of Git commands depending on the need.
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
# Add this import: | |
from sqlalchemy.sql import text | |
def upgrade(): | |
# ... | |
conn = op.get_bind() | |
conn.execute(text('UPDATE ...')) | |
# ... |
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 | |
/** | |
* Example of usage: | |
* ``` | |
* pdfshift('your_api_key', array( | |
* 'source' => 'http://www.example.com', | |
* 'use_print' => true | |
* )); | |
*/ | |
function pdfshift($apiKey, $params) { |
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 | |
# First of all, we check if the user is root | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run as root" | |
exit 1 | |
fi | |
# Changing the password of the root user | |
read -e -p "Do you want to change the root password? [Y/n] : " change_password |
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
body { | |
color: #212121; | |
font-family: "Helvetica Neue", "Calibri Light", Roboto, sans-serif; | |
-webkit-font-smoothing: antialiased; | |
-moz-osx-font-smoothing: grayscale; | |
letter-spacing: 0.02em; | |
} |
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
import asyncio | |
def maybeAsync(callable, *args, **kwargs): | |
""" | |
Turn a callable into a coroutine if it isn't | |
""" |
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
# Difference unicode/general : http://stackoverflow.com/a/367725/330867 | |
CREATE DATABASE dbname CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | |
CREATE USER 'dbuser'@'localhost' IDENTIFIED BY 'dbpass'; | |
GRANT USAGE ON * . * TO 'dbuser'@'localhost' IDENTIFIED BY 'dbpass' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ; | |
GRANT SELECT , INSERT , UPDATE , DELETE , CREATE , DROP , INDEX , ALTER , REFERENCES, LOCK TABLES ON `dbname` . * TO 'dbuser'@'localhost'; | |
FLUSH PRIVILEGES; | |
# To dump the database with the master relay details: |