Skip to content

Instantly share code, notes, and snippets.

View erkattak's full-sized avatar

Erik Straub erkattak

View GitHub Profile
@erkattak
erkattak / Dockerfile
Created December 18, 2017 04:34 — forked from bsedat/Dockerfile
Elixir Phoenix Umbrella App + Distillery Multistage Docker Build
FROM elixir:1.4.5 as asset-builder-mix-getter
ENV HOME=/opt/app
RUN mix do local.hex --force, local.rebar --force
# Cache elixir deps
COPY config/ $HOME/config/
COPY mix.exs mix.lock $HOME/
COPY apps/myproject_web/mix.exs $HOME/apps/myproject_web/
COPY apps/myproject_web/config/ $HOME/apps/myproject_web/config/
@erkattak
erkattak / gist:071ab8af1fc64013d955
Last active March 17, 2024 09:37 — forked from svperfecta/gist:141e7c1ae1e610c9cdcd
Example Event RSS Feed

Feed will support xcal (xml representation of ical). This allows us to handle event schedules (PBR) in a nice way

Feed will also support the media rss spec as part of our RSS parsing. This allows a nice way to provide links to assets (images, video, etc) within the rss feed in a standardized way.

Both of these require the tag to add additional XML namespaces (xmlns:media, xmlns:xcal).

These are used within an RSS feed like so:

<?xml version="1.0"?>
<rss version="2.0"
@erkattak
erkattak / gistbook.json
Last active August 29, 2015 14:11 — forked from anonymous/gistbook.json
Anonymous Gistbook
{"title":"Anonymous Gistbook","author":"Anonymous","pages":[{"pageName":"","sections":[{"type":"text","source":"Welcome to Gistbook!"},{"type":"html","source":"<h1>test</h1>"},{"type":"css","source":"h1 { color: red; }"},{"type":"javascript","source":"alert('welcome to the internet');"}]}],"public":true}
@erkattak
erkattak / hamlhtml5boilerplate.html.haml
Created August 9, 2012 18:23
My haml version of the html 5 boiler plate code
!!! 5
/[if lt IE 7] <html lang="en" class="no-js ie6">
/[if IE 7 ] <html lang="en" class="no-js ie7">
/[if IE 8 ] <html lang="en" class="no-js ie8">
/[if IE 9 ] <html lang="en" class="no-js ie9">
<!--[if (gt IE 9)|!(IE)]><!--> <html lang="en" class="no-js"> <!--<![endif]-->
%head
%meta{:charset => "utf-8"}/
/
Always force latest IE rendering engine (even in intranet) &amp; Chrome Frame
@erkattak
erkattak / syntax_highlighting.py
Created December 6, 2011 15:53 — forked from JeanMertz/syntax_highlighting.py
Ruby on Rails syntax highlight switcher for Sublime Text 2
import sublime, sublime_plugin
import os
class DetectFileTypeCommand(sublime_plugin.EventListener):
""" Detects current file type if the file's extension isn't conclusive """
""" Modified for Ruby on Rails and Sublime Text 2 """
""" Original pastie here: http://pastie.org/private/kz8gtts0cjcvkec0d4quqa """
def on_load(self, view):
filename = view.file_name()
<?php
// controller
function wutangclan() {
$this->load->model('odb');
$data['killerbees'] = $this->odb->getThatPaper();
$data['main_content'] = 'report/dashboard'; // main body view, can be whatever
$this->load->view('includes/template', $data);
?>
============