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
cap deploy:restart | |
triggering start callbacks for `deploy:restart' | |
* executing `multistage:ensure' | |
*** Defaulting to `production' | |
* executing `production' | |
* executing `deploy:restart' | |
[DEPRECATED] `deploy:restart` is going to be changed to Passenger mod_rails' method after 2.5.9 - see http://is.gd/2BPeA | |
* executing "/home/*******/current/script/process/reaper" | |
BUT!! |
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
scope :current, where(:current=>true} | |
validate :only_one_current | |
protected | |
def only_one_current | |
errors.add_to_base("Only one event can be current") if Event.current.reject{|c| c.eql?(self)}.size>0 | |
end |
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
# Setup ruby for rails development. Installs [:rvm, :homebrew, :wget] | |
echo -e '\n\n###########################################\nThanks! Now grab a beverage...\nThis may take awhile\n###########################################\n\n' | |
ruby -e "$(curl -fsSLk https://gist.github.com/raw/323731/install_homebrew.rb)" | |
brew install wget | |
bash < <(curl -s https://rvm.beginrescueend.com/install/rvm) | |
echo -e "\n[[ -s '$HOME/.rvm/scripts/rvm' ]] && . '$HOME/.rvm/scripts/rvm' # This loads RVM into a shell session." >> ~/.bash_profile | |
source ~/.bash_profile | |
echo -e '\n\n###########################################\nDone!\n###########################################\n\n' |
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
# ssh - OpenBSD Secure Shell server | |
# | |
# The OpenSSH server provides secure shell access to the system. | |
description "OpenSSH server" | |
# For Media Temple Linux (ve) VPS, use: | |
# start on filesystem and net-device-up IFACE=venet0:0 | |
start on filesystem and net-device-up IFACE=eth0 | |
stop on runlevel [!2345] |
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
function [sys,x0,str,ts]=pialg2(t,x,u,flag,k,z1,dt,vmin,vmax) | |
%discrete PI algorithm | |
%v(nh)=k*u(nh)-k*z1*u((n-1)h)+v((n-1)h) | |
% dt sampling time, the same as h. | |
if abs(flag)==2 | |
sys(1)=k*(1-z1)*u+x(1); | |
elseif flag==3 | |
v=k*u+x(1); | |
if v>vmax | |
v=vmax; |
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
% low-pass FIR filter code goes like this: | |
%trialfirS An M-file S-function | |
function [sys,x0,str,ts] = trialfirS(t,x,u,flag) | |
h=fir1(32,0.5); | |
ipv=randn(1,100); | |
switch flag, |
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
source 'http://rubygems.org' | |
gem 'rails', '3.0.7' | |
gem 'sqlite3' | |
# gem 'nifty-generators' | |
# gem 'bcrypt-ruby', :require => 'bcrypt' | |
gem 'jquery-rails', '1.0.5' | |
gem 'client_side_validations' |
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
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib. | |
- (void)viewDidLoad | |
{ | |
[super viewDidLoad]; | |
CGRect frame = CGRectMake(300, 300, 200, 30); | |
UITextField *textField = [[UITextField alloc] initWithFrame:frame]; | |
textField.borderStyle = UITextBorderStyleRoundedRect; | |
textField.textColor = [UIColor blackColor]; | |
textField.font = [UIFont systemFontOfSize:17.0]; |
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
# Deploy with Capistrano | |
gem 'capistrano' | |
gem 'capistrano-ext' |
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
Update the remote's url in the files below: | |
shared/cached-copy/.git/config | |
current/.git/config |
OlderNewer