Skip to content

Instantly share code, notes, and snippets.

View gemmadlou's full-sized avatar

Gemma Black gemmadlou

View GitHub Profile
@gemmadlou
gemmadlou / pod.yaml
Created December 24, 2020 12:17 — forked from matthewpalmer/pod.yaml
kubernetes nginx php-fpm pod
# Create a pod containing the PHP-FPM application (my-php-app)
# and nginx, each mounting the `shared-files` volume to their
# respective /var/www/html directories.
kind: Pod
apiVersion: v1
metadata:
name: phpfpm-nginx-example
spec:
volumes:
.css-selector {
    background: linear-gradient(98deg, #cc51b7, #2ca5dd);
    background-size: 400% 400%;
    -webkit-animation: AnimationName 2s ease infinite;
    -moz-animation: AnimationName 2s ease infinite;
    -o-animation: AnimationName 2s ease infinite;
    animation: AnimationName 2s ease infinite;
}
@-webkit-keyframes AnimationName {
    0%{background-position:74% 0%}
.css-selector {
    background: linear-gradient(65deg, #cc51b7, #2ca5dd, #c9a8e4);
    background-size: 600% 600%;
    -webkit-animation: AnimationName 10s ease infinite;
    -moz-animation: AnimationName 10s ease infinite;
    -o-animation: AnimationName 10s ease infinite;
    animation: AnimationName 10s ease infinite;
}
@-webkit-keyframes AnimationName {
    0%{background-position:69% 0%}
.css-selector {
    background: linear-gradient(65deg, #cc51b7, #2ca5dd, #c9a8e4);
    background-size: 600% 600%;
    -webkit-animation: AnimationName 10s ease infinite;
    -moz-animation: AnimationName 10s ease infinite;
    -o-animation: AnimationName 10s ease infinite;
    animation: AnimationName 10s ease infinite;
}
@-webkit-keyframes AnimationName {
    0%{background-position:69% 0%}
@gemmadlou
gemmadlou / gist:3bc63e37dea48c3b11557a8cbbfb6f35
Created November 13, 2020 09:39 — forked from avoelkl/gist:49563c516d6cb318eb34
Non-blocking and quick database dumps for large databases

How-to

Add --single-transaction and --quick to your mysqldump command.

--single-transaction

sets the isolation mode to REPEATABLE READ and starts a transaction before dumping data. useful for InnoDB tables, dumps the consistent state without blocking any applications.

--quick

@gemmadlou
gemmadlou / jq.md
Last active December 3, 2020 14:14
JQ. Cheatsheet

JQ

Key/Value Shape

[{"Name": "Jonny Bravo","Age": "58"},{"Name": "Dexter","Age": "34"}]

Map JSON to CSV

@gemmadlou
gemmadlou / parse_dotenv.bash
Created September 26, 2020 10:45 — forked from judy2k/parse_dotenv.bash
Parse a .env (dotenv) file directly using BASH
# Pass the env-vars to MYCOMMAND
eval $(egrep -v '^#' .env | xargs) MYCOMMAND
# … or ...
# Export the vars in .env into your shell:
export $(egrep -v '^#' .env | xargs)
@gemmadlou
gemmadlou / entrypoint.sh
Created September 9, 2020 10:43
My docker entrypoint example (Node)
#!/bin/sh -e
# https://medium.com/swlh/five-use-cases-for-docker-entry-points-a5eb6661dac6
case $1 in
server)
if [ "$ENVIRONMENT" == "production" ]; then
node /app/server.js
else
@gemmadlou
gemmadlou / auth.js
Created August 6, 2020 19:52
Nuxt Auth0 Vuex Store
import auth from 'auth0-js'
let auth0
let user
export const state = () => ({
isAuthenticated: false,
loggingIn: true,
requiresAuth: false
})
@gemmadlou
gemmadlou / 01.md
Created July 21, 2020 15:09
Kubernetes Filebeat,Elasticsearch and Kibana
  • Filebeat will live on the Kubernetes clusters with the applications as a daemonset
  • Elasticsearch will live on its own cluster