Skip to content

Instantly share code, notes, and snippets.

View mattatcha's full-sized avatar

Matt Aitchison mattatcha

View GitHub Profile
@mattatcha
mattatcha / server.go
Last active August 29, 2015 14:14 — forked from anonymous/server.go
package deployer
import (
"fmt"
"log"
"net/http"
"github.com/mholt/binding"
)
@mattatcha
mattatcha / go_scp.go
Last active August 29, 2015 14:18 — forked from jedy/go_scp.go
// https://blogs.oracle.com/janp/entry/how_the_scp_protocol_works
package main
import (
"code.google.com/p/go.crypto/ssh"
"crypto"
"crypto/rsa"
"crypto/x509"
"encoding/pem"
"fmt"
@mattatcha
mattatcha / .gitignore
Last active August 29, 2015 14:23 — forked from brianm/.gitignore
local_client
server
client
ext
@mattatcha
mattatcha / README.markdown
Created October 4, 2015 04:34 — forked from terlar/README.markdown
ArchLinux on Mac Book Retina 13"
@mattatcha
mattatcha / LICENSE
Created January 30, 2016 23:46 — forked from sinisterchipmunk/LICENSE
tar, gzip, and untar files using ruby in memory without tempfiles
Copyright (C) 2011 by Colin MacKenzie IV
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
@mattatcha
mattatcha / db.rake
Created February 8, 2016 17:24 — forked from carpeliam/db.rake
dump, load, or clear a mysql database for a rails project
namespace :db do
desc "Clear all tables"
task :clear => :environment do
conn = ActiveRecord::Base.connection
conn.tables.select{|t| t.start_with? ActiveRecord::Base.table_name_prefix }.each do |t|
conn.drop_table t
end
end
desc "Dump database into an SQL file"
@mattatcha
mattatcha / mysql-s3-backup.rb
Created February 8, 2016 17:24 — forked from rahuljiresal/mysql-s3-backup.rb
Backup MySQL Database to Amazon S3 Bucket
require 'date'
require 'aws/s3'
class Settings
attr_accessor :username, :password, :database, :mysql_location, :access_key, :secret_key, :bucket_name
end
user_settings = Settings.new
user_settings.username = DATABASE_USERNAME
user_settings.password = DATABASE_PASSWORD
@mattatcha
mattatcha / tumblr-download.go
Created February 9, 2016 22:01 — forked from indraniel/tumblr-download.go
A golang program to download pictures from a tumblr blog page
/*
This is a go program to download pictures from a tumblr blog page.
To Build:
go build -o tumblr-download tumblr-download.go
To Run:
# download the photos on the first page of tumblr blog
/**
* Required Variables.
*/
variable "name" {}
variable "port" {}
variable "elb_security_group" {}
variable "elb_subnets" {}
@mattatcha
mattatcha / hhvm_magento_setup.md
Created June 9, 2016 18:25 — forked from tegansnyder/hhvm_magento_setup.md
HHVM Magento Server Setup

I've had the opertunity to try a variety of different server configurations but never really got around to trying HHVM with Magento until recently. I thought I would share a detailed walkthrough of configuring a single instance Magento server running Nginx + Fast CGI + HHVM / PHP-FPM + Redis + Percona. For the purpose of this blog post I'm assuming you are using Fedora, CentOS, or in my case RHEL 6.5.

Please note: I'm 100% open to suggestions. If you see something I did that needs to be done a different way, please let me know. I haven't included my Perconca my.conf file yet. I will shortly. Also I plan on trying this same test with HHVM 3.3 and PHP 7.

Install the EPEL, Webtatic, and REMI repos

rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm