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
#!/bin/bash | |
read -p "Enter Username: " username | |
~/steamcmd/steamcmd.sh +login $username +force_install_dir ~/starbound +app_update 211820 +quit |
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
#!/bin/bash | |
cd ~/starbound/linux64 | |
./starbound_server |
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
#!/bin/bash --login | |
read -p "Enter Username: " username | |
read -s -p "Enter Password: " password | |
sudo apt-get update | |
sudo apt-get install lib32gcc1 | |
sudo apt-get install libpng12-0 | |
adduser steam |
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 ApplicationHelper | |
# Basic function with this if you have any object.errors that you wanted formated you just call this method and it will handle the formating | |
def error_summery( object ) | |
return unless object.errors.any? | |
# Build the messages li | |
messages = [] | |
object.errors.full_messages.each do |msg| | |
messages << content_tag(:li, msg) | |
end | |
content_tag(:div, "Please review the errors below", class: 'alert alert-danger') + |
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 ApplicationHelper | |
# Basic function with this if you have any object.errors that you wanted formated you just call this method and it will handle the formating | |
def formatted_errors(object = nil) | |
if object && object.errors.any? | |
return content_tag(:div, class: "ui_flash ui-widget ui-helper-clearfix", id: "error-messages") do | |
content_tag(:div, class: "ui-corner-all ui-state-error") do | |
content_tag(:span, "", class: "ui-icon ui-icon-left ui-icon-alert") + | |
content_tag(:span, "You have a total of " + pluralize(object.errors.count, "error") + " on this form") + | |
content_tag(:ul) do |
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
int count; | |
while(count<100) | |
{ | |
cout<<count; | |
} |
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 is part of the Minecraft Overviewer. | |
# | |
# Minecraft Overviewer is free software: you can redistribute it and/or | |
# modify it under the terms of the GNU General Public License as published | |
# by the Free Software Foundation, either version 3 of the License, or (at | |
# your option) any later version. | |
# | |
# Minecraft Overviewer is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
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 is a sample config file, meant to give you an idea of how to format your | |
# config file and what's possible. | |
# Define the path to your world here. 'My World' in this case will show up as | |
# the world name on the map interface. If you change it, be sure to also change | |
# the referenced world names in the render definitions below. | |
worlds['North'] = "~/maps/world" | |
worlds['East'] = "~/maps/world" |
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 Cart < ActiveRecord::Base | |
scope :find_standard_subscription_purchased, where("line_items.product_name = ? AND purchased = ?", "Standard Subscription", true).includes(:line_items) | |
belongs_to :user | |
has_many :line_items | |
has_many :payment_notification | |
def total_price |