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 | |
# Author: Alexander Schulz | |
VHOSTEN="/etc/nginx/sites-enabled/" | |
if [[ $1 == "-h" ]] || [[ $1 == "--help" ]] | |
then | |
echo 'Usage: n2dissite VHOST' | |
echo 'Disables Nginxs virtualhost VHOST.' |
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
<iframe id="theGameFrame" src="about:blank" width="784" height="1000"></iframe> | |
<script type="text/javascript"> | |
(function () { | |
"use strict"; | |
var hash, match, | |
location = document.location.href, | |
theFrame = document.getElementById('theGameFrame'); |
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 git_info | |
@@info ||= begin | |
{ | |
:application => app_name = (Rails.application.class.to_s.split('::').first rescue ""), | |
:environment => Rails.env, | |
:remote_url => `git remote -v`, | |
:remote_branch => `git branch -r`, | |
:last_commit => `git log --max-count=1` | |
} | |
rescue |
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
require 'aws/s3' | |
class StoredFile < ActiveRecord::Base | |
include AWS::S3 | |
after_destroy :delete_on_s3! | |
validates_presence_of :filename, :size, :content_type | |
validates_numericality_of :size, :greater_than => 0 | |
def extension |
NewerOlder