Connect to Database
\c [databasename]
//Font Smoothing | |
//src: http://maximilianhoffmann.com/posts/better-font-rendering-on-osx | |
@mixin font-smoothing($value: on) { | |
@if $value == on { | |
-webkit-font-smoothing: antialiased; | |
-moz-osx-font-smoothing: grayscale; | |
} | |
@else { |
This is the LAMP / LEMP environment backup guide in case you want or need to try my highload LEMP installation.
As a first thing we will setup a variable that will store current date and time. We will use year-month-day_hours-minutes-seconds format:
now=$(date +"%Y-%m-%d_%H-%M-%S")
//Src: https://github.com/swup/swup/blob/master/src/helpers/getDataFromHtml.js | |
import { queryAll } from '../utils'; | |
const getDataFromHtml = (html, containers) => { | |
let fakeDom = document.createElement('html'); | |
fakeDom.innerHTML = html; | |
let blocks = []; | |
for (let i = 0; i < containers.length; i++) { |
docker pull postgres | |
docker pull dpage/pgadmin4 | |
docker run \ | |
--name temppg \ | |
--net database_default \ | |
-p 54332:5432 \ | |
-e 'POSTGRES_USER=root' \ | |
-e 'POSTGRES_PASSWORD=root' \ | |
-e 'POSTGRES_DB=testtest' \ |
# best audio | |
youtube-dl -f bestaudio[ext=m4a] --embed-thumbnail --add-metadata | |
# best video and audio | |
youtube-dl -f best <video link> | |
# If you encounter any error during the muxing process or an issue with the video quality selection, you can use one of the following commands: | |
youtube-dl -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/bestvideo+bestaudio' --merge-output-format mp4 <video link> | |
# optional: --yes-playlist |
//src: https://github.com/swup/swup/blob/master/src/helpers/getCurrentUrl.js | |
const getCurrentUrl = () => { | |
return window.location.pathname + window.location.search; | |
}; | |
export default getCurrentUrl; |
function parseFormData(formData) { | |
const formEntries = new FormData(formData).entries(); | |
const data = {}; | |
for (var [formElementName, value] of formEntries) { | |
data[formElementName] = value; | |
} | |
return data; | |
} |
# https://stackoverflow.com/a/53269551 | |
ffmpeg -f concat -safe 0 -i <(for f in ./*.mp4; do echo "file '$PWD/$f'"; done) -c copy output.mp4 | |
# convert .mov to .mp4 | |
# https://mrcoles.com/convert-mov-mp4-ffmpeg/ | |
ffmpeg -i videoName.mov -vcodec h264 -acodec mp2 videoName.mp4 | |
ffmpeg -i input.flv -vcodec libx264 -acodec aac output.mp4 |
# src: https://stackoverflow.com/a/17824718/2823589 | |
git filter-branch --tree-filter "rm -rf node_modules" --prune-empty HEAD | |
git for-each-ref --format="%(refname)" refs/original/ | xargs -n 1 git update-ref -d | |
echo node_modules/ >> .gitignore | |
git add .gitignore | |
git commit -m 'Removing node_modules from git history' | |
git gc | |
git push origin master --force |