This file contains hidden or 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
// ==UserScript== | |
// @name PM ticketsystem Click Savers | |
// @namespace plenty.reverse-retail.com | |
// @homepage https://gist.github.com/bvogel | |
// @updateURL https://gist.githubusercontent.com/bvogel/7b319f013725925cc4de/raw/plenty.user.js | |
// @version 0.2 | |
// @description Some click savers for the ticket system | |
// @author Burkhard Vogel-Kreykenbohm | |
// @match https://plenty.reverse-retail.com/plenty/ui/admin.html | |
// @grant none |
This file contains hidden or 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
<VirtualHost *:80> | |
Servername buddy.buddyandselly.com | |
DocumentRoot "/home/rails-deploy/buddy/current/public/" | |
<Directory /home/rails-deploy/buddy/current/public> | |
AllowOverride all | |
Options -MultiViews | |
Order allow,deny | |
Allow from all | |
</Directory> | |
CustomLog /var/log/apache2/buddy-access_log combined |
This file contains hidden or 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
<IfModule mod_passenger.c> | |
PassengerRoot /usr/local/rvm/gems/ruby-2.2.1/gems/passenger-5.0.8 | |
PassengerDefaultRuby /usr/local/rvm/gems/ruby-2.2.1/wrappers/ruby | |
PassengerMaxPoolSize 20 | |
PassengerMaxInstancesPerApp 10 | |
</IfModule> |
This file contains hidden or 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 'barby' | |
require 'barby/barcode' | |
require 'barby/barcode/qr_code' | |
require 'barby/outputter/png_outputter' | |
str = 'Hello QrCode!! Using Gem for Barby, Barby-pngOutputter and Chunky-PNG.' | |
b = Barby::QrCode.new(str, level: :q, size: 10) | |
File.open('qr.png', 'w') do |f| | |
f.write b.to_png |
This file contains hidden or 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/sh | |
seven_days_ago=`date -d '7 days ago' +'%Y%m%d'` | |
rm -f /share/SecurityCam/webcam${seven_days_ago}* |
This file contains hidden or 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/sh | |
date_today=`date +%Y-%m-%d` | |
year_month_today=`date +%Y-%m` | |
ssh rails-deploy@buddy.buddyandselly.com "mysqldump -h 93.92.128.20 -u xxx -pxxx buddy_production | bzip2 -c > buddy/backups/buddy.dump.$date_today.sql.bz2" | |
if [ ! -d "/share/ReRe-Server/IT/Buddy_Development/Database-Backup/$year_month_today" ]; then | |
mkdir /share/ReRe-Server/IT/Buddy_Development/Database-Backup/$year_month_today | |
chown admin.everyone /share/ReRe-Server/IT/Buddy_Development/Database-Backup/$year_month_today | |
chmod 770 /share/ReRe-Server/IT/Buddy_Development/Database-Backup/$year_month_today | |
fi | |
scp rails-deploy@buddy.buddyandselly.com:~/buddy/backups/buddy.dump.$date_today.sql.bz2 /share/ReRe-Server/IT/Buddy_Development/Database-Backup/$year_month_today/ |
This file contains hidden or 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
for file in $(find *.xls.haml); do mv $file `echo $file | sed s/haml$/erb/`; done |
This file contains hidden or 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
pid=370 thr=69665790 file=utils.rb:176 time=2013-05-30 14:57:43.180 ]: *** Exception Timeout::Error in PhusionPassenger::Rack::ApplicationSpawner (Timeout::Error) (process 370, thread #<Thread:0x84e07fc>): | |
from /usr/local/lib/ruby/1.9.1/net/protocol.rb:146:in `rescue in rbuf_fill' | |
from /usr/local/lib/ruby/1.9.1/net/protocol.rb:140:in `rbuf_fill' | |
from /usr/local/lib/ruby/1.9.1/net/protocol.rb:122:in `readuntil' | |
from /usr/local/lib/ruby/1.9.1/net/protocol.rb:132:in `readline' | |
from /usr/local/lib/ruby/1.9.1/net/http.rb:2562:in `read_status_line' | |
from /usr/local/lib/ruby/1.9.1/net/http.rb:2551:in `read_new' | |
from /usr/local/lib/ruby/1.9.1/net/http.rb:1319:in `block in transport_request' | |
from /usr/local/lib/ruby/1.9.1/net/http.rb:1316:in `catch' | |
from /usr/local/lib/ruby/1.9.1/net/http.rb:1316:in `transport_request' |
This file contains hidden or 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
#Model | |
@user.should have(1).error_on(:username) # Checks whether there is an error in username | |
@user.errors[:username].should include("can't be blank") # check for the error message | |
#Rendering | |
response.should render_template(:index) | |
#Redirecting | |
response.should redirect_to(movies_path) |