- Create namespace.yaml
apiVersion: v1
kind: Namespace
metadata:
name: gitlab
kubectl create -f ./namespace.yaml
| defmodule Acme.Repo do | |
| use Ecto.Repo, | |
| otp_app: :acme, | |
| adapter: Ecto.Adapters.Postgres | |
| def with_prefix(prefix) do | |
| module_atom = Module.concat([Acme, Repo, WithPrefix, Macro.camelize(prefix)]) | |
| # We could not find a better way to see if this module already existed | |
| if !Kernel.function_exported?(module_atom, :prefix, 0) do |
apiVersion: v1
kind: Namespace
metadata:
name: gitlab
kubectl create -f ./namespace.yaml| defmodule Config do | |
| @moduledoc """ | |
| This module handles fetching values from the config with some additional niceties | |
| """ | |
| @doc """ | |
| Fetches a value from the config, or from the environment if {:system, "VAR"} | |
| is provided. | |
| An optional default value can be provided if desired. |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta name="description" content="[Queue for rendering 1 at a time]"> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/q.js/1.0.1/q.js"></script> | |
| <script src="https://npmcdn.com/@reactivex/[email protected]/dist/global/Rx.umd.js"></script> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width"> | |
| <title>JS Bin</title> | |
| <style> |
| defmodule HttpRequester do | |
| use GenServer | |
| def start_link(_) do | |
| GenServer.start_link(__MODULE__, nil, []) | |
| end | |
| def fetch(server, url) do | |
| # Don't use cast: http://blog.elixirsips.com/2014/07/16/errata-dont-use-cast-in-a-poolboy-transaction/ | |
| timeout_ms = 10_000 |
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
Why Should I Care (For Developers)
"Docker interests me because it allows simple environment isolation and repeatability. I can create a run-time environment once, package it up, then run it again on any other machine. Furthermore, everything that runs in that environment is isolated from the underlying host (much like a virtual machine). And best of all, everything is fast and simple."
| init: -> | |
| @_super() | |
| view = this | |
| resizeHandler = -> | |
| view.rerender() | |
| @.set('resizeHandler', resizeHandler); | |
| $(window).bind('resize', @get('resizeHandler')) |
| init: function() { | |
| var view = this; | |
| var resizeHandler = function() { | |
| view.rerender(); | |
| }; | |
| this.set('resizeHandler', resizeHandler); | |
| $(window).bind('resize', this.get('resizeHandler')); | |
| }, |
| previousjQuery = jQuery; | |
| jQuery(function($){ | |
| // only run in browsers that can do localStorage (not IE) and only on the tickets page | |
| if ('localStorage' in window && $('body').hasClass('tickets-show') || $('body').hasClass('tickets-new')) { | |
| // I want to make sure that this always runs with my version of jquery, not zendesk's | |
| $.getScript('http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.js', function(){ | |
| jQuery(function($){ | |
| //var username = 'testuser'; | |
| //var password = 'testpass'; |