Skip to content

Instantly share code, notes, and snippets.

View lumenpink's full-sized avatar
🏠
Starting a fresh project

Lumen Lohn lumenpink

🏠
Starting a fresh project
View GitHub Profile
@lumenpink
lumenpink / gist:ed049a940a8a2f98b857f8f2b6c1e627
Created May 6, 2019 01:41 — forked from pitch-gist/gist:2999707
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>
@lumenpink
lumenpink / seccompmysql.json
Created May 5, 2019 20:47
Seccomp For Dockerized MySQL
{
"defaultAction": "SCMP_ACT_ERRNO",
"archMap": [
{
"architecture": "SCMP_ARCH_X86_64",
"subArchitectures": [
"SCMP_ARCH_X86",
"SCMP_ARCH_X32"
]
},
@lumenpink
lumenpink / uppy-vue-example
Created May 3, 2019 15:36 — forked from pooot/uppy-vue-example
Very basic vuejs usage of uppy
<template>
<div :id="uppyId">
<div class="ThumbnailContainer" v-if="collection === 'thumbnail'">
<button id="open-thumbnail-modal" class="button">Select file</button>
</div>
<div class="DashboardContainer" v-else></div>
</div>
</template>
@lumenpink
lumenpink / vue-uppy-dashboard-example
Created May 3, 2019 15:36 — forked from dioniciodiaz/vue-uppy-dashboard-example
Very basic vuejs usage of uppy dashboard
<template>
<div :id="uppyId">
<div v-show="collection" class="DashboardContainer"/>
<div v-show="!collection" class="ThumbnailContainer">
<button id="open-thumbnail-modal" type="button" class="btn btn-primary" >Select File{{ collection ? 's' : '' }}</button>
</div>
</div>
</template>
<script>
@lumenpink
lumenpink / vue-uppy-input-example
Created May 3, 2019 15:35 — forked from dioniciodiaz/vue-uppy-input-example
Very basic vuejs usage of uppy input file
<template>
<div :id="uppyId">
<div class="uppyFileInput" />
</div>
</template>
<script>
import uppy from "@uppy/core";
import XHRUpload from "@uppy/xhr-upload";
import FileInput from "@uppy/file-input";
/*
* Invokes que submission of the main task form, via a button placed outside the form.
* Also, requests for confirmation after the form validation passes correctly.
* @author: Jonathan Vargas
*/
function triggerTaskFormSubmit ()
{
// Finds required objects
var completeButton = jQuery ('button.btn-task-form')[0];
var mainTaskForm = jQuery('form.main-task-form');
@lumenpink
lumenpink / server.js
Created January 18, 2019 04:54 — forked from taion/server.js
GraphQL subscription server with Socket.IO, backed by Redis Pub/Sub
const redisClient = redis.createClient(REDIS_URL);
const listeners = Object.create(null);
function addListener(channel, listener) {
if (!listeners[channel]) {
listeners[channel] = [];
redisClient.subscribe(channel);
}
listeners[channel].push(listener);
@lumenpink
lumenpink / mysql2sqlite.sh
Created April 24, 2018 22:02 — forked from esperlu/mysql2sqlite.sh
MySQL to Sqlite converter
#!/bin/sh
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the
# CREATE block and create them in separate commands _after_ all the INSERTs.
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk.
# The mysqldump file is traversed only once.
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite
@lumenpink
lumenpink / mime.sh
Created April 9, 2018 01:44 — forked from markusfisch/mime.sh
bash functions to dump and inspect a message in MIME format
#!/usr/bin/env bash
##############################################################################
#### MIME interface
##############################################################################
# Parse message in MIME format and create a temporary cache directory
mime_parse()
{
MIME_CACHE=${MIME_CACHE:-`mktemp -d ${BIN}.XXXXXXXXXX`}
@lumenpink
lumenpink / README.md
Created February 1, 2017 17:19 — forked from hubgit/README.md
Remove metadata from a PDF file, using exiftool and qpdf. Note that embedded objects may still contain metadata.

Anonymising PDFs

PDF metadata

Metadata in PDF files can be stored in at least two places:

  • the Info Dictionary, a limited set of key/value pairs
  • XMP packets, which contain RDF statements expressed as XML

PDF files