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 / 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/
@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 / 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
ffmpeg -i fifty-fifty_short.mp4 -b 5000k -acodec wmav2 -vcodec wmv2 -ar 44100 -ab 56000 -ac 2 -y fifty-fifty_short.wmv
@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 / mp32ogg.rb
Created May 16, 2011 20:52
Ruby script to convert dir of mp3s to oggs
#!/usr/bin/env ruby
require 'rubygems'
@dir = ARGV[0]
@i = 0
Dir.glob("#{@dir}/*.mp3").each do |mp3|
ogg = mp3.gsub('mp3', 'ogg')
system "ffmpeg -i \"#{mp3}\" -acodec libvorbis -ac 2 \"#{ogg}\""
@i += 1
end
@ideaoforder
ideaoforder / osx_dev_setup.md
Last active June 28, 2016 14:18
OS X Dev ENV
@ideaoforder
ideaoforder / node_statsd_librato
Last active May 15, 2016 20:04
Node + Statsd + Librato install
## Node
### OS X
brew install node
### Ubuntu
sudo apt-get install python-software-properties
sudo apt-add-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs
@ideaoforder
ideaoforder / delayed_job_initd
Created January 14, 2014 21:32
delayed_job init.d script
#! /bin/sh
### BEGIN INIT INFO
# Provides: delayed_job
# Required-Start: $all
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop:
### END INIT INFO