๐โโฌ
This file contains hidden or 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
var isPrime = (function() { | |
var cache = {}, | |
callbackList = {}; | |
return function(args, callback) { | |
if (typeof args === 'number') { | |
args = [args]; | |
} | |
var argsCount = args.length, |
This file contains hidden or 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
class User < ActiveRecord::Base | |
include ValidationContext | |
with_context :first do |context| | |
context.validates_presence_of :name | |
end | |
with_context :second do |context| | |
context.validates_presence_of :email | |
end |
This file contains hidden or 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
(:name haskell-mode | |
:description "A Haskell editing mode" | |
:type github | |
:pkgname "haskell/haskell-mode" | |
:post-init (progn | |
(add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode) | |
(add-hook 'haskell-mode-hook 'turn-on-haskell-indentation))) |
This file contains hidden or 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
class SinglyLinkedList | |
def initialize | |
@first_node = nil | |
end | |
def add(value) | |
if last_node = @first_node | |
while last_node.next_node | |
last_node = last_node.next_node | |
end |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
require 'active_support/core_ext' | |
module TypeValidator | |
extend ActiveSupport::Concern | |
included do | |
def self.method_added(method_name) | |
if @last_types |
This file contains hidden or 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
class DeviseCreateUsers < ActiveRecord::Migration | |
def change | |
create_table(:users) do |t| | |
## Database authenticatable | |
t.string :email, :null => false, :default => "" | |
t.string :encrypted_password, :null => false, :default => "" | |
## Recoverable | |
t.string :reset_password_token | |
t.datetime :reset_password_sent_at |
This file contains hidden or 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
ใใใใใใใใใ ๏ผฟ,,,,,ใใใใใใใใ โโใ|_| |_|ใ๏ผ | |
ใใใใใใใใ /ๅทๅท๏พใใใใใ ใใ| ๏ฝ๏ฟฃ | |ใ ใใ๏พใใใใก | |
ใใใใใใใ ///ๅทๅท๏ฝใใใใใใใ |_| ๅ. |ใใใ๏ผผใใใใท | |
ใใใใใใใ๏ผใๅทไปๅท/๏ผฟ,โ'๏ฟฃใฝใใใ | |ใใใใใใใ ้ฃ | |
ใใใใใ๏ผฟ๏ผฟ๏ผใผ๏พใพ๏ฟฃ(ใใ๏ผฟ-ใใ|ใใ|_|ใใใ๏ผผใใใใฃ | |
ใใใใ/ใใใ|ใใใใใใใ๏ฝ-ใใ๏พ๏ผฟ|ใใใใใใใ<ใใใใฆ | |
ใใใใ'-,,๏ผฟใ|ใใใใใใใ |ใใ๏พk๏พ๏ผใ๏ฝ_๏ฝ๏ฝ_๏ฝ ,-,ใ ใ ๏ผใใใ | |
ใใใใใใใ"|ใใใใใใใใ|ใใใใใใใ๏ผ๏ผใ๏ผใใใๅ ด | |
ใใใใใใใ |ใใใใใใใใใ|ใใใใใๅ๏ผใใ๏ฟฃใฝใใ ๅ | |
ใใใใใใใ|ใใใใใ๏ผฟ๏ผฟ๏ผฟ |ใใ ใ ใ ใ ใ ใใ ใใใใใ |
This file contains hidden or 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
#compdef rails | |
# ------------------------------------------------------------------------------ | |
# Description | |
# ----------- | |
# | |
# Completion script for Ruby on Rails (http://rubyonrails.org/). | |
# | |
# ------------------------------------------------------------------------------ | |
# Authors | |
# ------- |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
require 'grape' | |
require 'sinatra/base' | |
class App | |
def self.application | |
Rack::Cascade.new [Web, API] | |
end |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
require 'grape' | |
module Cat | |
class API < Grape::API | |
prefix :api | |
resource :cats do | |
get ":id" do |