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
{ | |
"configurations" : [ | |
{ | |
"global" : { | |
"nagios_contact" : "admin@localhost" | |
} | |
} | |
], | |
"host_groups" : [ | |
{ |
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
```rb | |
def associative_create_statement(query_params={}) | |
user_agent = request.user_agent | |
browser = Browser.new(ua: user_agent) | |
os = get_os(browser) | |
query_params.reverse_merge!( | |
original_url: request.original_url, | |
controller_name: controller_name, | |
action_name: action_name, |
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
module.exports = function( grunt ) { | |
grunt.initConfig( { | |
pkg: grunt.file.readJSON( 'package.json' ), | |
// app/assets | |
assetsScssDir: 'app/assets/scss', | |
assetsJsDir: 'app/assets/js', | |
assetsImgDir: 'app/assets/img', |
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 clone | |
survey = get_survey | |
clone = Survey.new | |
clone.survey_type_id = survey.survey_type_id | |
survey.questions.each do |question| | |
clone.questions.build(axis: question.axis, value: question.value) | |
end | |
clone.save! |
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
C:\Users\Lee\RubymineProjects\keep_it_local>vagrant up | |
Bringing machine 'default' up with 'virtualbox' provider... | |
[default] Importing base box 'precise32'... | |
←[0K[default] Matching MAC address for NAT networking... | |
[default] Setting the name of the VM... | |
[default] Clearing any previously set forwarded ports... | |
[default] Creating shared folders metadata... | |
[default] Clearing any previously set network interfaces... | |
[default] Preparing network interfaces based on configuration... |
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 bash | |
# https://www.digitalocean.com/community/articles/how-to-install-ruby-on-rails-on-ubuntu-12-04-lts-precise-pangolin-with-rvm | |
# Before we do anything else, we should run a quick update to make sure that all of the packages we download are up to date: | |
echo 'Updating system packages...' | |
sudo apt-get update | |
# Install RVM to install the latest version of Ruby | |
echo 'Installing RVM...' | |
sudo apt-get install curl |