Skip to content

Instantly share code, notes, and snippets.

View krazylegz's full-sized avatar

Vikram Dighe krazylegz

  • Clipper Magazine
  • Lititz, PA
View GitHub Profile

Keybase proof

I hereby claim:

  • I am krazylegz on github.
  • I am krazylegz (https://keybase.io/krazylegz) on keybase.
  • I have a public key ASAfmG2RhqSTRXaSyK8vCjpMPSJTahAKdUTwAEjXAts2Ewo

To claim this, I am signing this object:

@krazylegz
krazylegz / router.js
Last active March 31, 2017 03:27 — forked from Robdel12/controllers.application.js
Emberx-select test helper failure
import Ember from 'ember';
import config from './config/environment';
const Router = Ember.Router.extend({
location: 'none',
rootURL: config.rootURL
});
Router.map(function() {
this.route('scientists');
New:
class BaseNotifier
def initialize(attributes={})
@client_ip, @ec2_instance_id, @environment, @hl7_message,
@hl7_response, @queue_response, @stats, @title = %i(
client_ip ec2_instance_id environment hl7_message
hl7_response queue_response stats title
).map do |key|
attributes.fetch(key, '')
end
alias ag='ag --pager="less -XFR" --hidden'
# Ruby aliases
alias bi='bundle install'
alias be='bundle exec'
alias beg='bundle exec guard'
alias ber='bundle exec rspec -t ~benchmark --no-profile'
alias bera='bundle exec rake'
alias berf='bundle exec rspec -t ~slow -t ~js -t ~benchmark --no-profile'
alias berb='bundle exec rspec --no-profile'
alias berfd='bundle exec rspec --format=documentation --no-profile'
repush () {
if [ -z "$1" ]
then
branch=$(git rev-parse --abbrev-ref HEAD)
else
branch=$1
fi
if [[ $branch != 'master' ]]
then
# Unicorn - Unicorn job file
description "Unicorn"
author "Vikram Dighe <[email protected]>"
# When to start the service
start on started networking
# When to stop the service
stop on stopping networking
@krazylegz
krazylegz / kiyu.erl
Created July 9, 2013 01:21
Dave Thomas's PragPub June 6 Elixir examples converted (back?) to Erlang.
-module(kiyu).
-export([sum/1, fib/1]).
sum([]) ->
0;
sum([First | Rest]) ->
First + sum(Rest).
fib(0) ->
1;
<?php
$term_list = '';
$terms = get_terms('product_cat', array( 'taxonomy' => 'product_cat', 'child_of' => 16, 'exclude_tree' => 15 ););
foreach ($terms as $term) {
$term_list .= '<li><a href="/shop/product-category/' . $term->slug . '/" title="' . sprintf(__('View all products filed under %s', 'my_localization_domain'), $term->name) . '">' . $term->name . '</a></li>';
}
echo $term_list;
?>
@krazylegz
krazylegz / gist:5015095
Last active December 14, 2015 02:39 — forked from nertim/gist:5014613
class AddSchedulingAppointmentStatuses < ActiveRecord::Migration
def change
create_table :appointment_status do |t|
t.string :code
t.string :description
t.timestamps
end
AppointmentStatus.create(:code => 'S', :description => 'Scheduled')
@krazylegz
krazylegz / gist:5014621
Last active December 14, 2015 02:38 — forked from nertim/gist:5014613
class AddSchedulingAppointmentStatuses < ActiveRecord::Migration
def change
create_table :schapptstatc do |t|
t.string :code
t.string :descrip
t.timestamps
end
AppointmentStatus.create(:code => 'S', :description => 'Scheduled')
AppointmentStatus.create(:code => 'I', :description => 'Checked In')
AppointmentStatus.create(:code => 'O', :description => 'At Resource')