Skip to content

Instantly share code, notes, and snippets.

View albankora's full-sized avatar

Alban Kora albankora

View GitHub Profile
@albankora
albankora / sls-aws-sso.md
Last active February 16, 2024 09:22
Serverless Framework with AWS SSO

Edit config file

vim ~/.aws/config

The config file structure example

[profile dev]
sso_session = dev
sso_account_id = XXXXXXXXXXXX

Docker Containers

# run a docker container
$ docker run {image tag} 
# run an docker container on interactive mode 
$ docker run -it {image tag} bash
CREATE TABLE user (
user_id INT(7),
user_prefix VARCHAR(16),
name VARCHAR (255),
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY(user_id, user_prefix)
);
DELIMITER $$
CREATE PROCEDURE prepare_data()
@albankora
albankora / basic-commands
Last active February 11, 2018 11:01
Basic commands...
# Download Files from remote to local
scp -r user@host:/path/to/remote/folder /path/to/local/folder
# MYSQL
#log to mysql cli
mysql -u {username}-p
#List all databases
SHOW DATABASES;
# Install Postman
wget https://dl.pstmn.io/download/latest/linux64 -O postman.tar.gz
sudo tar -xzf postman.tar.gz -C /opt
rm postman.tar.gz
sudo rm /usr/bin/postman
sudo ln -s /opt/Postman/Postman /usr/bin/postman
@albankora
albankora / rabbitmq.sh
Last active September 10, 2017 06:19
RabbitMQ installation
sudo apt-get update
sudo apt-get upgraed
wget http://packages.erlang-solutions.com/ubuntu/erlang_solutions.asc
sudo apt-key add erlang_solutions.asc
sudo apt-get update
sudo apt-get install erlang
sudo apt-get install erlang-nox
@albankora
albankora / LEMP_Laravel_config
Last active June 8, 2017 02:35
LEMP install and Laravel config
#make a folder for your app
mkdir /var/www
mkdir /var/www/laravel
#nginx config for laravel app
server {
listen 80 default_server;
root /var/www/laravel/public/;
index index.php index.html index.htm;
@albankora
albankora / capistrano-3-basic-set-up
Last active February 9, 2017 14:09
Capistrano 3 basic set up
#create a public key base on the link bellow
https://www.digitalocean.com/community/tutorials/how-to-set-up-ssh-keys--2
#the local public key has to be added on bitbucket.com and the remote server
https://help.github.com/articles/generating-ssh-keys/
#if you added a pass phrase to the key you need to add your public key to the remote server
http://capistranorb.com/documentation/getting-started/authentication-and-authorisation/#toc_3
#set up the public ssh to your account
<?xml version="1.0" encoding="UTF-8"?>
<project name="{Project Name}" default="dev" basedir=".">
<property name="basedir" value="${project.basedir}" />
<property name="vendorBinDir" value="${basedir}/vendor/bin" />
<property name="source" value="${basedir}/app" />
<property name="exclude" value="${source}/cache,${source}/config,${source}/language,${source}/third_party,${source}/views,${source}/libraries" />
<target name="dev" depends="clean,lint,pdepend,phpmd,phpcpd,phploc,phpcs,phpunit,phpcb" />
<target name="full" depends="clean,lint,phpdoc,pdepend,phpmd,phpcpd,phploc,phpcs,phpunit,phpcb" />
@albankora
albankora / Git-usage-and-configs
Created September 16, 2015 12:00
Git Usage and configs
### Config ###
git config --global core.autocrlf input
### Create remote branch ###
git push origin <branchName>
### Delete remote branch ###
git push origin --delete <branchName>
###Start developing new feature###