Skip to content

Instantly share code, notes, and snippets.

@tirasmuturi
tirasmuturi / S3 buckets copy.md
Created September 3, 2019 15:09 — forked from ushu/S3 buckets copy.md
Copy between S3 buckets w/ different accounts

This is a mix between two sources:

basically the first resource is great but didn't work for me: I had to remove the trailing "/*" in the resource string to make it work. I also noticed that setting the policy on the source bucket was sufficient. In the end these are the exact steps I followed to copy data between two buckets on two accounts

Basically the idea there is:

  • we allowe the destination account to read the source bucket (in the console for the source account)
  • we log as the destination and start the copy
#THIS SHOULD BE ADDED IN YOUR location /
add_header 'Access-Control-Allow-Origin' '*';
#wide cors
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
#
# Om nom nom cookies
@tirasmuturi
tirasmuturi / Instructions.sh
Created August 15, 2018 12:08 — forked from GhazanfarMir/Instructions.sh
Install PHP7.2 NGINX and PHP7.2-FPM on Ubuntu 16.04
########## Install NGINX ##############
# Install software-properties-common package to give us add-apt-repository package
sudo apt-get install -y software-properties-common
# Install latest nginx version from community maintained ppa
sudo add-apt-repository ppa:nginx/stable
# Update packages after adding ppa
@tirasmuturi
tirasmuturi / install-docker.sh
Created August 10, 2018 10:16 — forked from brianz/install-docker.sh
Install docker on Amazon Linux
#!/bin/bash
#
# steps taken verbatim from:
# http://docs.aws.amazon.com/AmazonECS/latest/developerguide/docker-basics.html#install_docker
#
sudo yum update -y
sudo yum install -y docker
sudo service docker start
sudo usermod -a -G docker ec2-user
# log out and log in to pickup the added group
[program:radio-stream-1]
command=ffmpeg -i udp://@localhost:4001 -loglevel debug -c:a libmp3lame -b:v 128k -bufsize 128k http://localhost:8090/feed1.ffm
#command=ffmpeg -i 'udp://@localhost:4001?fifo_size=1000000&overrun_nonfatal=1' -loglevel debug -c:a libmp3lame -map 0:a http://localhost:8090/feed1.ffm
#directory=~/
autostart=yes
autorestart=yes
startretries=10
stderr_logfile=/var/log/ffmpeg/radio-stream-1.err.log
stdout_logfile=/var/log/ffmpeg/radio-stream-1.log
# Port on which the server is listening. You must select a different
# port from your standard HTTP web server if it is running on the same
# computer.
HTTPPort 8090
# Address on which the server is bound. Only useful if you have
# several network interfaces.
HTTPBindAddress 0.0.0.0
# Number of simultaneous HTTP connections that can be handled. It has
@tirasmuturi
tirasmuturi / ubuntu_agnoster_install.md
Created January 30, 2018 13:35 — forked from renshuki/ubuntu_agnoster_install.md
Ubuntu 16.04 + Terminator + Oh My ZSH with Agnoster Theme

Install Terminator (shell)

sudo add-apt-repository ppa:gnome-terminator
sudo apt-get update
sudo apt-get install terminator

Terminator should be setup as default now. Restart your terminal (shortcut: "Ctrl+Alt+T").

Install ZSH

@tirasmuturi
tirasmuturi / Ubuntu-Compass-ruby[16.04]
Created January 29, 2018 10:11 — forked from AungMyoKyaw/Ubuntu-Compass-ruby[16.04]
Compass installation for ubuntu 16.04
[https://gist.github.com/stephou0104/233b5c99884f1d8c8b8b#file-ubuntu-compass-ruby]
sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties
sudo apt-get install libgdbm-dev libncurses5-dev automake libtool bison libffi-dev
curl -L https://get.rvm.io | bash -s stable
gpg2 --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
source ~/.rvm/scripts/rvm
echo "source ~/.rvm/scripts/rvm" >> ~/.bashrc
@tirasmuturi
tirasmuturi / tmux.md
Created January 10, 2018 07:15 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@tirasmuturi
tirasmuturi / rabbitmq.txt
Created January 9, 2018 07:37 — forked from sdieunidou/rabbitmq.txt
create admin user on rabbitmq
rabbitmqctl add_user test test
rabbitmqctl set_user_tags test administrator
rabbitmqctl set_permissions -p / test ".*" ".*" ".*"