Skip to content

Instantly share code, notes, and snippets.

View theCrab's full-sized avatar
💭
What happens when you take a long holiday from work? Shit happens

The Crab theCrab

💭
What happens when you take a long holiday from work? Shit happens
View GitHub Profile

Create an account at Stripe 2. Account Setting/Api Key Grab your Api key here 3. Put your Key in secrets.yml as

stripe_secret_key: your key here
stripe_publishable_key: your key here
@PascalAnimateur
PascalAnimateur / Place.js
Last active February 22, 2021 20:19
Geospatial example in Sails.js using native MongoDB query
/* Place model */
module.exports = {
attributes: {
name: {
type: 'string',
required: true
},
@davejlong
davejlong / conference.rb
Last active October 4, 2015 10:35
Representing relationships in Lotus::Model
class Conference
include Lotus::Entity
attributes :title, :call_code, :technician_id
# Are the following 2 methods correct for representing the relationship to Technician
def technician
@technician ||= TechnicianRepository.find @technician_id
end
@jodosha
jodosha / Gemfile
Last active December 9, 2020 15:09
Full stack Lotus application example
source 'https://rubygems.org'
gem 'rake'
gem 'lotus-router'
gem 'lotus-controller'
gem 'lotus-view'
group :test do
gem 'rspec'
gem 'capybara'
@dblandin
dblandin / Rakefile
Last active June 17, 2016 15:30 — forked from ParkinT/Rakefile
RubyMotion Configuration and Deploy/Release
# -*- coding: utf-8 -*-
$:.unshift('/Library/RubyMotion/lib')
require 'motion/project/template/ios'
require 'bundler'
Dir.glob('./config/*.rb').each { |file| require file }
if ARGV.join(' ') =~ /spec/
Bundler.require :default, :development, :spec
elsif ARGV.join(' ') =~ /testflight/

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post

@pirj
pirj / gist:6152272
Created August 4, 2013 22:47
Template module
class BaseWall
def self.Wall length, width, material
Module.new do
define_method(:length) { length }
define_method(:width) { width }
define_method(:material) { material }
def self.included clazz
private :length, :width, :material
end
class MyApp::Interface::NavigationBar
include ActionView::Helpers::UrlHelper
delegate :url_helpers, to: 'Rails.application.routes'
def initialize(template, current_user)
@template = template
@current_user = current_user
end
@twerth
twerth / example.rb
Created March 23, 2013 17:58
A simple example of creating a UIView with a UICollectionView as a subview in RubyMotion using Teacup for styling
# A simple example of creating a UIView with a UICollectionView as a subview
# in RubyMotion using Teacup for styling
#
# Your controller will need to set the stylesheet: stylesheet :example
# and create this view like so: subview Example, :my_example_view
class Example < UIView
CELL_IDENTIFIER = 'example_cell'
def initWithFrame(frame)
@mbj
mbj / config.yml
Created February 28, 2013 20:30
dm2 components
repository_names:
- datamapper/dm-session
- datamapper/dm-mapper
- datamapper/dm-relation-graph
- datamapper/devtools
- dkubb/adamantium
- dkubb/ice_nine
- dkubb/equalizer
- dkubb/descendants_tracker
- dkubb/abstract_class