Create a folder to store the databases :
mkdir -p /usr/share/GeoIP
Download Country IP database
wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
gunzip GeoIP.dat.gz
// https://wordpress.org/gutenberg/ | |
(wp => { | |
const el = wp.element.createElement | |
const __ = wp.i18n.__ | |
wp.blocks.registerBlockType( 'plugins/gutenvue', { | |
title: __('Gutenberg: VueJS', 'gutenvue'), | |
category: 'widgets', | |
supportHTML: false, | |
attributes: { |
alias headers='curl -I -s -X GET' |
// Array utils ///////////////////////////////////////////////////////////////// | |
export const combine = (...arrays) => [].concat(...arrays) | |
export const compact = arr => arr.filter(Boolean) | |
export const contains = (() => Array.prototype.includes | |
? (arr, value) => arr.includes(value) | |
: (arr, value) => arr.some(el => el === value) | |
)() |
const h2 = require('http2') | |
const { run, send } = require('micro') | |
const cert = require('openssl-self-signed-certificate') | |
const { PORT = 3443 } = process.env | |
const options = { | |
key: cert.key, | |
cert: cert.cert, | |
passphrase: cert.passphrase | |
} |
{ | |
"Reset": { | |
"prefix": "reset", | |
"scope": "stylus", | |
"body": [ | |
"*", | |
"*::before", | |
"*::after", | |
" box-sizing border-box", | |
"", |
const url = require('url') | |
const fs = require('fs') | |
const path = require('path') | |
const { send } = require('micro') | |
const mime = require('mime') | |
module.exports = async (req, res) => { | |
const parseUrl = url.parse(req.url) | |
let file = `.${parseUrl.pathname}` |
Create a folder to store the databases :
mkdir -p /usr/share/GeoIP
Download Country IP database
wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
gunzip GeoIP.dat.gz
if [ -f ~/.bash_docker_compose ]; then | |
. ~/.bash_docker_compose | |
fi |
# List containers | |
alias dps='docker ps' | |
# Fetch the logs of a container | |
dl() { | |
docker logs $1 -f | |
} | |
# Run a command in a running container | |
de() { |
#!/usr/bin/bash | |
npx -p @vue/cli \ | |
-p @vue/cli-service-global \ | |
-p pug \ | |
-p pug-loader \ | |
-c "echo '<template lang="pug"> | |
div | |
h1 Zero-config Prototyping | |
</template>' > App.vue && vue serve" |