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 | |
echo "What should the Application be called (e.g. Google Calendar)?" | |
read inputline | |
name=$inputline | |
echo "What is the url (e.g. https://www.google.com/calendar/render)?" | |
read inputline | |
url=$inputline |
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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'curb' | |
require 'uri' | |
#uri = URI.parse("https://oa.bt.com/ews/Services.wsdl") | |
c = Curl::Easy.new("https://oa.bt.com/ews/Exchange.asmx") | |
#c = Curl::Easy.new("https://oa.bt.com/ews/Services.wsdl") |
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
sudo rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm |
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
#!/usr/bin/env ruby | |
command = %(ps aux| awk '/.*#{ARGV[0]}.*/{total+=$6}END{print total/1024, "Mb"}') | |
total_mem = `#{command}` | |
puts total_mem |
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
# Debian | |
adduser <user> | |
adduser <user> admin | |
passwd -e <user> | |
# Centos | |
useradd -G wheel <user> | |
passwd <user> | |
chage -d 0 <user> |
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 'rake/clean' | |
Rake::TaskManager.class_eval do | |
def remove_task(task_name) | |
@tasks.delete(task_name.to_s) | |
end | |
end | |
Rake.application.remove_task('default') |
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
namespace :db do | |
namespace :migrate do | |
desc "Migrate development, test and production databases" | |
task :all => :environment do | |
Dir.glob('config/environments/*.rb').map{|f| File.basename(f).sub(/\.rb$/, '')}.each do |env| | |
puts "Migrating #{env} database..." | |
ActiveRecord::Base.establish_connection(ActiveRecord::Base.configurations[env]) | |
ActiveRecord::Migrator.migrate("db/migrate/") | |
ActiveRecord::Base.remove_connection | |
end |
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/bash | |
username=$1 | |
adduser $username | |
usermod -G wheel $username | |
echo set user password: | |
passwd $username | |
chage -d 0 $username |
NewerOlder