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
@import url("https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500;700&family=Fira+Sans:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap"); | |
:root { | |
--background: #282828; | |
--light-background: #3c3836; | |
--lighter-background: #504945; | |
--dark-background: #3c3836; | |
--darker-background: #1d2021; | |
--foreground: #ebdbb2; | |
--current-line: #504954; |
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
# in spec_helper.rb | |
RSpec.configure do |config| | |
records = [] | |
config.before :suite do | |
Cequel::Record.descendants.each do |klass| | |
klass.after_create {|r| records << r } | |
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
/* | |
Basic Usage | |
=========== | |
Assuming your markup looks like this: | |
<table id="table" class="table"></table> | |
<div id="pagination" class="text-center"></div> |
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
class Property < ActiveRecord::Base | |
belongs_to :detail | |
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
#!/usr/bin/ruby -w | |
if ENV['DEBUG'] | |
def debug(message) | |
$stderr.puts message | |
end | |
else | |
def debug(message) | |
# nop | |
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
require 'minitest/autorun' | |
class List | |
include Enumerable | |
def initialize() | |
@notes = [] | |
yield @notes if block_given? | |
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
# _plugins/haml_converter.rb | |
module Jekyll | |
class HamlConverter < Converter | |
safe true | |
def setup | |
return if @setup | |
require 'haml' | |
@setup = true |
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
[21] pry(main)> kill_subprocess('yes',2,2) | |
Timed Out! | |
Tries: 1 | |
Timed Out! | |
Tries: 2 | |
=> "yes completed" | |
[22] pry(main)> |
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
def object_changed?(instance, params) | |
instance.attributes != instance.attributes.merge(params) | |
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
current_account. | |
report_groups. | |
where(:id => params[:report_group_id]). | |
first. | |
reports. | |
where(:id => params[:id]). | |
first |
NewerOlder