myfunction(item) for item in items
- GitHub Staff
- https://bento.me/kyanny
- @kyanny
- in/kyanny
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'uri' | |
require 'net/http' | |
class Chunked | |
def initialize(data, chunk_size) | |
@size = chunk_size | |
if data.respond_to? :read | |
@file = data | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Install instructions for 10.2: | |
http://download.oracle.com/docs/cd/B19306_01/relnotes.102/b15666/toc.htm | |
http://download.oracle.com/docs/cd/B19306_01/install.102/b15667/toc.htm | |
[Required files] | |
10201_database_linux_x86_64.cpio.gz | |
10201_companion_linux_x86_64.cpio.gz | |
p6810189_10204_Linux-x86-64.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'bundler/setup' | |
require 'gollum/frontend/app' | |
Precious::App.set(:gollum_path, File.dirname(__FILE__)) | |
Precious::App.set(:wiki_options, {}) | |
run Precious::App |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# app/models/my_model.rb | |
module MyApp | |
module Model | |
def self.included(base) | |
base.send :include, Mongoid::Document | |
base.send :include, Mongoid::Timestamps | |
base.send :include, ActiveAdmin::Mongoid::Patches | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define([ | |
'backbone', | |
'underscore', | |
'project/views/form' | |
], function(Backbone, _, ProjectFormView) { | |
var View = Backbone.View.extend({ | |
events: { | |
'submit form': 'submit' | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source :rubygems | |
gem 'sinatra' | |
gem 'json' | |
gem 'omniauth' | |
gem 'omniauth-oauth2' | |
gem 'omniauth-github' | |
# gem 'omniauth-att', :path => File.expand_path("./../../omniauth-att", __FILE__) | |
gem 'thin' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'bundler' | |
require 'fileutils' | |
require 'net/http' | |
require 'net/https' | |
require 'uri' | |
TMP_DIR = "/tmp/gems" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This document distills the magic that happens when you create a file with the ".jst" | |
// and ".ejs" extensions anywhere on your asset path in Ruby on Rails, courtesy of the | |
// Sprockets library (https://github.com/sstephenson/sprockets). | |
// | |
// For the purpose of this example, imagine that you have created a template for | |
// messages in `app/assets/javascripts/backbone/templates/messages/message.jst.ejs` | |
// with the following contents: | |
// | |
// <h1><%= user.full_name %></h1> | |
// <p><%= body %></p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config/initializers/active_admin_mongomapper_patches.rb | |
require "active_admin" | |
require "active_admin/resource_controller" | |
require 'ostruct' | |
module ActiveAdmin | |
class Namespace | |
# Disable comments | |
def comments? |