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
| # Simple bijective function | |
| # Basically encodes any integer into a base(n) string, | |
| # where n is ALPHABET.length. | |
| # Based on pseudocode from http://stackoverflow.com/questions/742013/how-to-code-a-url-shortener/742047#742047 | |
| ALPHABET = | |
| "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".split(//) | |
| # make your own alphabet using: | |
| # (('a'..'z').to_a + ('A'..'Z').to_a + (0..9).to_a).shuffle.join |
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
| # NewRelic instrumenter for GraphQL-ruby | |
| # | |
| # In your controller: | |
| # ::NewRelic::Agent.add_custom_attributes({ | |
| # user_id: @user.try(:id), | |
| # query_string: @query_string, | |
| # query_arguments: @query_variables | |
| # }) | |
| # | |
| # @document = self.class.trace_execution_scoped(["GraphQL#parse"]) do |
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
| unbind C-b | |
| set -g prefix C-s | |
| bind-key -r C-s send-prefix | |
| set -sg escape-time 0 | |
| bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded" | |
| bind-key -n C-h select-pane -L | |
| bind-key -n C-j select-pane -D |
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 MyApp.Release.Tasks do | |
| @app :my_app | |
| @start_apps [:logger, :ssl, :postgrex, :ecto_sql, :telemetry] | |
| @repos Application.get_env(@app, :ecto_repos, []) | |
| def migrate do | |
| start_services() | |
| run_migrations() | |
| stop_services() |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <title>Barcode Printer Demo</title> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/barcodes/JsBarcode.code128.min.js"></script> | |
| <script src="https://printjs-4de6.kxcdn.com/print.min.js"></script> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> |
OlderNewer