Skip to content

Instantly share code, notes, and snippets.

View ziazek's full-sized avatar

Zek ziazek

View GitHub Profile
@ziazek
ziazek / backup.yml
Created May 10, 2023 08:18
Fly.io Database Backup
name: Back up database
run-name: Task
on:
schedule:
- cron: '0 */6 * * *'
# every 6 hours
workflow_dispatch:
jobs:
backup:
runs-on: ubuntu-latest
{"cloud.feedly.com":{"_enabled":true,"_rules":{".content h1, .content h2, .content h3, .content h4, .content h5":{"font-family":"\"Optima\""},"a.entryTitle.title.read, div.content":{"font-family":"\"Optima\""},"a.title":{"font-family":"\"Optima\""},"div.content h2, div.content h3, div.content h4":{"font-family":"\"ChunkFive\""},"div.content p":{"line-height":"1.4"},"div.inlineFrame":{"left":"12%","position":"relative"},"div.metadata":{"font-family":"\"Plantagenet Cherokee\""},"div.sideAreaModule":{"display":"none"},"div.summary span":{"font-family":"\"Optima\""},"div.u100Entry":{"font-family":"\"Optima\""}}},"developer.android.com":{"_enabled":true,"_rules":{"body":{"background":"#FFF6DB","height":"auto"},"div.col-12":{"color":"#172948","font-family":"\"Optima\"","font-size":"110%","line-height":"1.4"},"p code a":{"font-size":"110%"},"table":{"background-color":"#ADD1DA"},"th":{"background-color":"#172948"}}},"en.wikipedia.org":{"_enabled":true,"_rules":{"#bodyContent":{"font-size":"14px"},"#bodyContent h3":{
'.source.js':
'log with label':
'prefix': 'llog'
'body': "console.log('$1', $1);"
'import Lodash':
'prefix': 'lodash'
'body': 'import _ from "lodash";'
'import Moment':
'prefix': 'moment'
'body': 'import moment from "moment";'
@ziazek
ziazek / keymap.cson
Created October 16, 2017 01:59
Atom keymap
# Your keymap
#
# Atom keymaps work similarly to style sheets. Just as style sheets use
# selectors to apply styles to elements, Atom keymaps use selectors to associate
# keystrokes with events in specific contexts. Unlike style sheets however,
# each selector can only be declared once.
#
# You can create a new keybinding in this file by typing "key" and then hitting
# tab.
#
@ziazek
ziazek / prod.exs
Created June 12, 2017 08:09
config/prod.exs
# ...
config :deploy_phoenix, DeployPhoenix.Endpoint,
http: [port: 8888],
url: [host: "example.com", port: 443, scheme: "https"],
cache_static_manifest: "priv/static/manifest.json"
# ...
# at 3:47am, renew all Let's Encrypt certificates over 60 days old
47 3 * * * certbot renew --renew-hook "service nginx reload"
To Action From
-- ------ ----
OpenSSH ALLOW Anywhere
Nginx Full ALLOW Anywhere
OpenSSH (v6) ALLOW Anywhere (v6)
Nginx Full (v6) ALLOW Anywhere (v6)
@ziazek
ziazek / deploy_phoenix
Created June 10, 2017 05:32
nginx configuration
upstream deploy_phoenix {
server 127.0.0.1:8888;
}
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
# REDIRECT HTTP www.example.com to HTTPS example.com
@ziazek
ziazek / ssl-params.conf
Created June 10, 2017 05:07
/etc/nginx/snippets/ssl-params.conf
# from https://cipherli.st/
ssl_protocols TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
ssl_ecdh_curve secp384r1;
ssl_session_cache shared:SSL:10m;
ssl_session_tickets off;
ssl_stapling on;
ssl_stapling_verify on;
@ziazek
ziazek / ssl-example.com.conf
Created June 10, 2017 04:50
/etc/nginx/snippets/ssl-example.com.conf
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;