Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
'Import private github.com repos into gitlab'
import re
import requests
import sys
from termcolor import colored
created = colored('created', 'green')
<?php
function postCommission() {
$rlia = $this->getResLineItems();
$rid = $this->getResItemId();
$skip = false;
$cruise_items = explode(",", CRUISE_CABIN_IDS);
array_push($cruise_items, CRUISE_COMM_PORT_FEES_ITEM_ID);
array_push($cruise_items, CRUISE_COMM_PORT_TAXES_ITEM_ID);
if ($this->isCruise()) {
@charset "UTF-8"
// ♫
// -----------------------------------------------
@function rem($size)
$remSize: $size / 16
@return #{$remSize}rem
@function tracking($points: 100)
# Install this recipe with:
# brew install --HEAD https://gist.github.com/raw/4400739/ed95c69b473941486a49c1e76857149945a3d9f5/elixir.rb
require 'formula'
class ErlangInstalled < Requirement
def message; <<-EOS.undent
Erlang is required to install.
You can install this with:
Not found
@onkel-dirtus
onkel-dirtus / frame.ex
Created November 7, 2012 20:08
AMQP Frame
defmodule AMQP.Frame do
@moduledoc """
Builds and parses frame binaries
"""
@major_version 0
@minor_version 9
@revision 1
@protocol "AMQP" <> <<0, @major_version, @minor_version, @revision>>
@onkel-dirtus
onkel-dirtus / elixir.rb
Created October 9, 2012 19:19 — forked from devinus/elixir.rb
Elixir Homebrew recipe - v0.6.0
# Install this recipe with:
# brew install --HEAD https://raw.github.com/gist/3715216/4f1bbf7d73d372bf9a2eeb5364142ee03bc51f55/elixir.rb
require 'formula'
class ErlangInstalled < Requirement
def message; <<-EOS.undent
Erlang is required to install.
You can install this with:
@onkel-dirtus
onkel-dirtus / key_value_matcher.js
Created September 25, 2012 21:13
An ember routerMatcher that handles key/value pairs
App.KeyValueMatcher = Ember.Object.extend({
state: null,
keys: [],
// HACK: used by ember to see if the route
// has dynamic segments...
identifiers: [true],
init: function() {
{
"sort":
[
{
"price":
{
"order":"asc",
"missing":"_last"
}
}
@onkel-dirtus
onkel-dirtus / select.js
Created June 6, 2012 17:50
Custom Ember Select View
var get = Em.get, getPath = Em.getPath, set = Em.set;
App.SelectView = Em.View.extend({
tagName: 'select',
optionLabelPath: 'key',
optionValuePath: 'value',
selection: null,
change: function() {
var content = get(this, 'content'),