- Order cert (Godaddy wildcard etc...)
openssl genrsa -des3 -out server.pass.key 2048
openssl rsa -in server.pass.key -out server.key
openssl req -nodes -new -key fixed.key -out fixed.csr
Common name must be domain name (eg: www.fixed.com or *.fixed.com for wildcard)- Go to Ec2->Load Balancers->Listeners then upload the new cert and private key
a. pbcopy < fixed.key # private key
b. pbcopy < 8sdf23ljksfds.crt # public key certificate
c. pbcopy < gd_bundle-g2-g1.crt # certificate chain
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
#> lower_bound upper_bound fdo_count_to_suspend_on | |
#> 1 0 18 2 | |
#> 2 19 86 3 | |
#> 3 87 180 4 | |
#> 4 181 310 5 | |
#> 5 311 inf 6 | |
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
Commands: | |
docker run hello-world # run container | |
docker run -d -p 4000:80 hello-world # run in the background on port 4000 | |
docker container stop CONTAINER_ID # stop container id | |
docker stop $(docker ps -a -q) # stop all containers | |
docker image ls # list images | |
docker container ls --all # list all containers | |
docker build -t appname . # build the app in currect dir |
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: dockerize all envs to avoid env specific hacks like this | |
group :development, :test, :production do | |
gem 'wkhtmltopdf-binary' | |
end | |
### TODO: dockerize all envs to avoid env specific hacks like this | |
# wkhtmltopdf-binary library needed a different binary to work on staging server | |
group :staging do | |
gem 'wkhtmltopdf-binary', git: 'https://github.com/djburdick/wkhtmltopdf_binary_gem.git', branch: 'master' | |
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
wget http://wkhtmltopdf.googlecode.com/files/wkhtmltopdf-0.9.9-static-i386.tar.bz2 | |
tar xvjf wkhtmltopdf-0.9.9-static-i386.tar.bz2 | |
sudo mv wkhtmltopdf-i386 /usr/local/bin/wkhtmltopdf |
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 . -name '*rb' -type f -exec perl -pi -e 's/OldClassName(?!\w)/NewClassName/g;' \{\} \; |
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 `delayed_jobs` set run_at = DATE_ADD(NOW(), INTERVAL 480+rand()*45 MINUTE) where `last_error` like "%ticketNumber=%" |
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
# In spec_helper.rb | |
RSpec.configure do |config| | |
.... | |
rubocop_output = `rubocop` | |
print rubocop_output | |
fail "RuboCop Errors" unless rubocop_output.match(/files inspected, no offenses detected/) | |
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
curl -I fixed.com - show header info | |
host fixed.com | |
host www.fixed.com | |
whois fixed.com | |
nslookup fixed.com | |
nslookup -query=mx fixed.com | |
nslookup -type=ns fixed.com | |
ping fixed.com | |
dig +trace http://fixed.com | |
curl -s -w '\nLookup time:\t%{time_namelookup}\nConnect time:\t%{time_connect}\nPreXfer time:\t%{time_pretransfer}\nStartXfer time:\t%{time_starttransfer}\n\nTotal time:\t%{time_total}\n' -o /dev/null http://www.fixed.com |
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
1. embed content in uiview (select all and Editor -> Embed In) | |
2. embed that uiview in a uiscrollview | |
3. set uiscrollview size to phone screen size (eg: 320x568) | |
4. set uiview size to the size of the entire contest (eg: 320x900) | |
5. create property outlets for both uiview and uiscrollview | |
6. set the scrollview content size to the uiview size. self.scrollView.contentSize = self.contentView.bounds.size; | |
7. make sure the contentSize code is in - (void)viewDidAppear:(BOOL)animated (not in viewDidLoad) | |
or if in a navigation controller it must be in: viewDidLayoutSubviews |
NewerOlder