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
eval `ssh-agent -s` |
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
CREATE USER "app-dev" WITH PASSWORD 'app-dev'; --PASSWORD MUST HAVE SINGLE QUOTE! | |
CREATE DATABASE "skillbadges_development"; | |
GRANT ALL PRIVILEGES ON DATABASE "skillbadges_development" TO "app-dev"; |
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
sc [Servername] Command Servicename [Optionname= Optionvalue...] |
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 'rails_helper' | |
include Warden::Test::Helpers | |
module SignInHelper | |
def sign_in_as_a_valid_user | |
Warden.test_mode! | |
user = FactoryGirl.create(:user) | |
login_as(user, :scope => :user) | |
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
# Use one of the download links here: http://phantomjs.org/download.html | |
# In this case, it's the 32-bit version. | |
sudo yum install freetype fontconfig | |
cd ~ | |
wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-i686.tar.bz2 | |
bunzip2 phantomjs*.tar.bz2 | |
tar xvf phantomjs*.tar | |
sudo cp phantomjs*/bin/phantomjs /usr/bin/phantomjs | |
phantomjs -v |
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
-- TODO Parameterize me! | |
RESTORE FILELISTONLY | |
FROM DISK = 'C:\dbname-snapshot-20140410.bak' | |
GO | |
-- Put database in single-user mode. | |
-- This will also close existing connections. | |
ALTER DATABASE dbName | |
SET SINGLE_USER WITH | |
ROLLBACK IMMEDIATE |
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
-- Backup Database to .bak File | |
-- Need to pass in FILENAME and DB arguments | |
DECLARE @fileName VARCHAR(90); | |
DECLARE @db_name VARCHAR(20); | |
DECLARE @fileDate VARCHAR(20); | |
SET @fileName = FILENAME; | |
SET @db_name = DB; | |
SET @fileDate = CONVERT(VARCHAR(20), GETDATE(),112); | |
SET @fileName = @fileName + @db_name + '_' + RTRIM(@fileDate) + '.bak'; |
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
C:\Windows\SysWOW64\odbcad32.exe | |
Useful when you can't find ODBC connections that you KNOW are there.... |
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
# ~/.bashrc | |
alias rails="bundle exec rails" | |
alias rake="bundle exec rake" | |
alias rspec="bundle exec rspec" | |
alias cap="bundle exec cap" |
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
find /path/to/files -type f -exec sed -i '' 's/oldstring/new string/g' {} \; |
OlderNewer