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
common: &common | |
adapter: postgresql | |
encoding: unicode | |
pool: 5 | |
host: localhost | |
username: user | |
password: | |
development: | |
<<: *common |
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
@mixin hide-text { | |
overflow: hidden; | |
text-indent: 100%; | |
white-space: nowrap; | |
} | |
body h1:first-child { | |
@include hide-text; | |
background: url('https://www.google.com/images/srpr/logo3w.png') no-repeat 50% top; | |
height: 95px; |
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 Product < ActiveRecord::Base | |
before_create :generate_unique_code | |
private | |
def generate_unique_code | |
begin | |
self.code = ("%05d" % Random.new.rand(99999)) | |
end while !Product.find_by_code(self.code).nil? |
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
#!/bin/bash | |
# Cron example: 0 2 * * * /bin/bash /path/to/snapper.sh | |
# AWS Credentials | |
AWS_PK=/path/to/pk-xxx.pem | |
AWS_CERT=/path/to/cert-xxx.pem | |
# Array of EC2 Instance IDs | |
INSTANCES=('i-xxx01') |
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
mymodule { | |
@at-root { | |
.#{&}-header { ... } | |
.#{&}-footer { ... } | |
.#{&}-body { | |
a { ... } | |
span { ... } | |
p { ... } | |
} | |
} |
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
=pseudos($pseudos) | |
@each $pseudo in $pseudos | |
@if $pseudo == disabled | |
&:disabled, | |
&[disabled], | |
&[disabled]:hover, | |
&[disabled]:active, | |
&.pseudo-class-disabled, | |
&.pseudo-class-disabled:hover, | |
&.pseudo-class-disabled:active |
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
.block | |
%p Block | |
.block__element | |
%p Element | |
.block__element--modifier | |
%p Element with Modifier | |
.block__element--modifier2 | |
%p Element with Modifier |
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
<div class="content"> | |
<div class="content__right">This content must be first on mobile but floated to the right on a bigger screen</div> | |
<div class="content__left">This content must be last on mobile but floated to the left on a bigger screen</div> | |
</div> |
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
.econ__table | |
%table.data-table-container | |
%thead.data-table-header | |
%tr | |
%th Col 1 | |
%th Col 2 | |
%th Col 3 | |
%th Col 4 | |
%th Col 5 | |
%th Col 6 |
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
<nav am-Nav='header'> | |
<ul am-Nav-List> | |
<li am-Nav-Item='active'><a href="#">Foo</a></li> | |
<li am-Nav-Item><a href="#">Bar</a></li> | |
</ul> | |
</nav> |