Skip to content

Instantly share code, notes, and snippets.

{
"configurations" : [
{
"global" : {
"nagios_contact" : "admin@localhost"
}
}
],
"host_groups" : [
{
```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,
@leebrooks0
leebrooks0 / gist:8256214
Last active January 2, 2016 05:19
Gruntfile for use with Revel. Files were just random files added to test that this script works.
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',
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!
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...
#!/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