Skip to content

Instantly share code, notes, and snippets.

View ideaoforder's full-sized avatar

Mark Dickson ideaoforder

  • Sitesteaders Developement
View GitHub Profile
@ideaoforder
ideaoforder / osx_dev_setup.md
Last active June 28, 2016 14:18
OS X Dev ENV
@ideaoforder
ideaoforder / magento-xml-rpc.txt
Last active February 10, 2017 17:47
Make XML RPC requests to a Magento store
Using Mac's XML-RPC app
https://itunes.apple.com/us/app/xml-rpc-client/id424424203?mt=12
Get your session key
Endpoint URI: https://www.yourstore.com/index.php/api/xmlrpc/
Method: login
Params: 'username', 'password'
Using that session key, you can get a product's stock, for instance
Endpoint URI: https://www.yourstore.com/index.php/api/xmlrpc/
@ideaoforder
ideaoforder / rbenv_ruby-2.2.2.md
Last active August 29, 2015 14:27
Rbenv Ruby Upgrade
Install Ruby 2.2.2
cd ~/.rbenv/plugins/ruby-build
git pull
rbenv install 2.2.2

https://github.com/sstephenson/rbenv

Set the current shell to use it, and prepare for Rails - This won't affect current install
@ideaoforder
ideaoforder / ruby_mysql2.md
Last active August 29, 2015 14:27
Install ruby mysql2 gem on OSX

locate mysql_config

gem install mysql2 -- --with-mysql-config=/usr/local/MYSQL_PATH/bin/mysql_config

@ideaoforder
ideaoforder / open_source_repo
Created January 7, 2015 17:58
Open-Sourcing a Github Repo
First and foremost: DON'T USE THE AMAZON MASTER KEY/SECRET
Use an IAM USER for each site/repo, with its own creds, so you can reset them easily and limit access
Secondly, use .env/secrets.yml--either using Heroku/Foreman, dot-env (Rails 3), or secrets.yml (Rails 4)
https://devcenter.heroku.com/articles/config-vars
Last thing, you'll need to scrub sensitive data out of your app's history (even if you reset/deleted those passwords, best to remove them from the history as well--you want to seem like a pro, don't you?)
https://help.github.com/articles/remove-sensitive-data/
https://rtyley.github.io/bfg-repo-cleaner/
@ideaoforder
ideaoforder / postfix_gmail_relay.md
Last active July 30, 2017 18:23
Postfix Gmail Relay (to circumvent Comcast blocking port 25)

sudo nano /etc/postfix/main.cf

Add this to bottom of file

# Gmail SMTP
relayhost=[smtp.gmail.com]:587
smtp_tls_loglevel=1
smtp_tls_security_level=encrypt
smtp_sasl_auth_enable=yes
Install XCode tools
https://developer.apple.com/downloads/index.action
OR OS X GCC
https://github.com/kennethreitz/osx-gcc-installer
Install Homebrew
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
brew install git
@ideaoforder
ideaoforder / godaddy-ssl-howto
Created April 8, 2014 16:30
GoDaddy + Nginx SSL
openssl req -new -newkey rsa:2048 -nodes -keyout yourdomain.key -out yourdomain.csr
http://support.godaddy.com/help/article/3601/generating-a-certificate-signing-request-nginx
http://support.godaddy.com/help/article/4976/rekeying-an-ssl-certificate
# Be sure to remember to chain them!
cat gd_bundle-g2-g1.crt >> yourdomain.crt
# Move 'em
sudo mv yourdomain.crt /etc/ssl/certs/yourdomain.crt
@ideaoforder
ideaoforder / ttf_install
Created April 2, 2014 15:04
Installing True Type (barcode) font on Ubuntu
Fonts installed by this method will be accessible to all users of the system.
(1) Copy fonts to be installed in /usr/share/fonts ( create a subdirectory in the directory to store the .ttf files)
(2) Type: fc-cache -fv
Grab the barcode font here:
http://www.free-barcode-font.com/