Models | Examples |
---|---|
Display ads | Yahoo! |
Search ads |
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
build: | |
steps: | |
- script: | |
name: seed the database | |
code: rake db:seed | |
- script: | |
name: example multiple commands | |
code: | | |
export TEST_VAR=12345 | |
cat $TEST > test.txt |
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
// Sass: | |
+linear-gradient(colors(#ddd, #aaa)) //assumes "top" | |
+linear-gradient(colors(#ddd, #aaa), "left") | |
+linear-gradient(colors(#ddd, #aaa), "top left") | |
+linear-gradient(colors(#ddd, #aaa), "top right") | |
// Color stops - I'm using default vertical gradients for simplicity | |
+linear-gradient(colors(#ddd, #ccc, #aaa)) | |
+linear-gradient(colors(#ddd, #ccc 20%, #aaa)) |
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
<object data="http://www.website.com/responsive/img/logo.svg" type="image/svg+xml" class="logo"> | |
<!--[if lte IE 8 ]--> | |
<img src="http://www.website.com/responsive/img/logo.gif" alt="Image Title"> | |
<!--![endif]--> | |
</object> | |
<!-- Edit .svg file and erase width and height properties so it can automatically scale with viewport --> | |
<!-- | |
CSS: | |
img, object { |
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
################################################################## | |
# /etc/elasticsearch/elasticsearch.yml | |
# | |
# Base configuration for a write heavy cluster | |
# | |
# Cluster / Node Basics | |
cluster.name: logng | |
# Node can have abritrary attributes we can use for routing |
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 'time' | |
require 'logger' | |
require 'aws-sdk' | |
AWS_REGION = "us-east-1" | |
AWS_KEY_ID = "" | |
AWS_SECRET_KEY = "" |
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
# Example usage: | |
require 'active_record/nonpersisted_attribute_methods' | |
class Node < ActiveRecord::Base | |
include ActiveRecord::NonPersistedAttributeMethods | |
define_nonpersisted_attribute_methods [:bar] | |
# Example of using with ancestry and getting :parent to show up in changes hash. | |
has_ancestry | |
define_nonpersisted_attribute_methods [:parent] |
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
# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine | |
# This is how I upload my new Sol Trader builds (http://soltrader.net) | |
# Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash | |
S3KEY="my aws key" | |
S3SECRET="my aws secret" # pass these in | |
function putS3 | |
{ | |
path=$1 |
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
Geocoder.configure(:lookup => :test) | |
Geocoder::Lookup::Test.set_default_stub( | |
[ | |
{ | |
'latitude' => 40.7143528, | |
'longitude' => -74.0059731, | |
'address' => 'New York, NY, USA', | |
'state' => 'New York', | |
'state_code' => 'NY', |
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 file should be placed on the directory of ~/blog/config | |
upstream unicorn { | |
server unix:/tmp/unicorn.todo.socket fail_timeout=0; | |
} | |
server { | |
listen 80 default; | |
#server_name example.com; | |
root /home/username/blog/public; |
OlderNewer