Skip to content

Instantly share code, notes, and snippets.

Avatar

Andre Sugai asugai

View GitHub Profile
@asugai
asugai / install.md
Last active Aug 28, 2018
Ora one-liner installer
View install.md

To install all tools:

bash <(curl -s http://setup.orainteractive.com)

You can also use

bash <(curl -s http://setup.orainteractive.com) [ios|android|web|automation|design|all]
@asugai
asugai / setup
Last active Jul 12, 2018
Setup for a clean development machine
View setup
#!/usr/bin/env bash
# Welcome to the orainteractive setup script!
#
# Based on the thoughtbot laptop script
# https://raw.githubusercontent.com/thoughtbot/laptop/master/mac
# Ask for the administrator password upfront.
sudo -v
@asugai
asugai / Brewfile
Last active May 1, 2017
Brewfile for Ora computer setup
View Brewfile
cask_args appdir: '/Applications'
tap 'caskroom/cask'
# PHP
tap 'homebrew/homebrew-php'
brew 'php71'
brew 'php71-mcrypt'
brew 'php71-intl'
brew 'composer'
brew 'mariadb'
cask 'sequel-pro'
@asugai
asugai / gist:8408561d5134cf090f78
Last active Aug 5, 2019
enable gzip / compression on an Amazon AMI EC2 instance via .htaccess
View gist:8408561d5134cf090f78
# Mixings from:
# https://www.clayharmon.com/words/posts/enabling-gzip-compression-on-ec2
# http://www.samaxes.com/2008/04/htaccess-gzip-and-cache-your-site-for-faster-loading-and-bandwidth-saving/
# http://www.tonmoygoswami.com/2013/05/how-to-enable-gzip-on-amazon-elastic.html
# ------------------------------------------------------------------------------
# | Compression |
# ------------------------------------------------------------------------------
<IfModule mod_deflate.c>
@asugai
asugai / gist:5b1593c43708c3a33017
Last active Apr 30, 2017
Twitter `created_at` to Mysql a unix timestamp
View gist:5b1593c43708c3a33017
UNIX_TIMESTAMP(STR_TO_DATE(`created_at`, '%a %b %d %H:%i:%s +0000 %Y'))
Changes "Mon Nov 10 21:14:41 +0000 2014" to "1415654081"
@asugai
asugai / Install composer on Amazon AMI running on EC2
Last active Sep 20, 2020
Install composer on Amazon AMI running on EC2
View Install composer on Amazon AMI running on EC2
$ cd ~
$ sudo curl -sS https://getcomposer.org/installer | sudo php
$ sudo mv composer.phar /usr/local/bin/composer
$ sudo ln -s /usr/local/bin/composer /usr/bin/composer
then you can run
$ sudo composer install
@asugai
asugai / S3 Hosted Bucket Policy
Created Aug 20, 2013
S3 Hosted Bucket Policy
View S3 Hosted Bucket Policy
{
"Version": "2008-10-17",
"Statement": [
{
"Sid": "AddPerm",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": "s3:GetObject",
You can’t perform that action at this time.