This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Emoji | |
| # http://unicode.org/emoji/charts/full-emoji-list.html | |
| <Multi_key> <e> <m> <o> <colon> <D> : "😀" | |
| <Multi_key> <e> <m> <o> <x> <D> : "😁" | |
| <Multi_key> <e> <m> <o> <x> <apostrophe> <D> : "😂" | |
| <Multi_key> <e> <m> <o> <colon> <apostrophe> <D> : "😂" | |
| <Multi_key> <e> <m> <o> <r> <o> <f> <l> : "🤣" | |
| <Multi_key> <e> <m> <o> <colon> <d> : "😃" | |
| <Multi_key> <e> <m> <o> <x> <parenright> : "😄" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| defmodule RequestCache do | |
| @moduledoc """ | |
| Simple ETS-based cache. | |
| """ | |
| use GenServer | |
| @type t :: %{ttl: integer, invalidators: %{}} | |
| @type cache_key :: any | |
| @type cache_value :: any |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # pylint: disable=E0401,E1002 | |
| import array | |
| import functools | |
| import dbus | |
| import dbus.exceptions | |
| import dbus.mainloop.glib | |
| import dbus.service | |
| import pprint | |
| try: | |
| from gi.repository import GObject as gobject |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| adaway.org | |
| api.twitter.com | |
| bitbucket.org | |
| changelogs.ubuntu.com | |
| de.ign.com | |
| dl.google.com | |
| dmp.adform.net | |
| dropbox.com | |
| feedly.com | |
| gearbest.com |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| from itertools import tee | |
| # colors are floating-point 3-element tuples (doing RGBA is a matter of setting the component count) | |
| def poly_gradient(colors, steps, components=3): | |
| def linear_gradient(start, finish, substeps): | |
| yield start | |
| for i in range(1, substeps): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| nginx-proxy: | |
| image: 'jwilder/nginx-proxy' | |
| ports: | |
| - '80:80' | |
| - '443:443' | |
| volumes: | |
| - '/path/to/certs:/etc/nginx/certs:ro' | |
| - '/etc/nginx/vhost.d' | |
| - '/usr/share/nginx/html' | |
| - '/var/run/docker.sock:/tmp/docker.sock:ro' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # | |
| # Use the following script using sudo to install multiple golang installations on your debian | |
| # update-alternatives creates, removes, maintains and displays information about the symbolic links comprising the alternatives system | |
| # Usage : sudo ./full_golang_install.sh | |
| # | |
| if [[ $(id -u) -ne 0 ]] ; then echo "This script should be run using sudo or as the root user" ; exit 1 ; fi | |
| ## Configuration and init |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # sync everything excluding things in .gitignore | |
| # delete anything on target not in source | |
| # include dotfiles and symlinks, also use compression | |
| rsync -azP --delete --filter=":- .gitignore" . my-target-host:/my/target/directory |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function sleep(time, func, ...) | |
| local now = os.time() | |
| local thread = coroutine.create(func) | |
| repeat until (os.time() - now > time) | |
| coroutine.resume(thread, ...) | |
| end | |
| function asleep(time, func, ...) | |
| coroutine.wrap(function() | |
| local now = os.time() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| backup: | |
| image: 'borja/dockup:latest' | |
| environment: | |
| - AWS_ACCESS_KEY_ID=<SET ME> | |
| - AWS_DEFAULT_REGION=<SET ME> | |
| - AWS_SECRET_ACCESS_KEY=<SET ME> | |
| - BACKUP_NAME=<SET ME> | |
| - PATHS_TO_BACKUP=/var/lib/postgresql/data | |
| - S3_BUCKET_NAME=<SET ME> | |
| restart: on-failure |