Skip to content

Instantly share code, notes, and snippets.

View kirankarki's full-sized avatar
🎯
Focusing

Aung Kyaw Phyo kirankarki

🎯
Focusing
View GitHub Profile
@kirankarki
kirankarki / Cost Optimization Pillar
Created April 12, 2020 07:48 — forked from josephphyo/Cost Optimization Pillar
The 5 Pillars of the AWS Well-Architected Framework
1. Cost Effective Resource selection
2. Match Supply and demand
3. Awareness of spend
4. Optimize
<< Cost Effective Resource Selection >>
Provision to current needs with an eye to future.
Right Sizing.
Use data to choose purchase option. (on-demand or spot)
Optimize by Regions, AZ and Edge (global infrastructure)
phpbrew use 5.6.16
phpbrew ext install gd
--- fail
phpbrew ext disable gd
cd ~/.phpbrew/build/php-5.6.16/ext/gd
make clean
./configure --with-gd=shared --with-vpx-dir=/usr --with-jpeg-dir=/usr --with-xpm-dir=/usr --with-png-dir=/usr --enable-gd-native-ttf --with-freetype-dir=/usr/include/freetype2/freetype
make
make test
make install
@kirankarki
kirankarki / spinner3.js
Created February 18, 2019 03:43 — forked from unicodeveloper/spinner3.js
Spinner
/*
360 degree Image Slider v2.0.4
http://gaurav.jassal.me
Copyright 2015, gaurav@jassal.me
Dual licensed under the MIT or GPL Version 3 licenses.
*/
/*
360 degree Image Slider v2.0.4
@kirankarki
kirankarki / setup.sh
Created November 7, 2018 09:51 — forked from marulitua/setup.sh
Install latest php with phpbrew on ubuntu 18.04
#!/bin/bash
# Instal php5.6 with phpbrew on ubuntu 18.04
# Install all dependencies
sudo apt update
sudo apt install wget php build-essential libxml2-dev libxslt1-dev libbz2-dev libcurl4-openssl-dev libmcrypt-dev libreadline-dev libssl-dev autoconf
wget https://github.com/phpbrew/phpbrew/raw/master/phpbrew
chmod +x phpbrew
mv phpbrew /usr/local/bin
@kirankarki
kirankarki / tutorial.md
Created July 17, 2018 09:01 — forked from swalkinshaw/tutorial.md
Designing a GraphQL API

Tutorial: Designing a GraphQL API

This tutorial was created by Shopify for internal purposes. We've created a public version of it since we think it's useful to anyone creating a GraphQL API.

It's based on lessons learned from creating and evolving production schemas at Shopify over almost 3 years. The tutorial has evolved and will continue to change in the future so nothing is set in stone.

@kirankarki
kirankarki / Upgrading rails 5.0 to 5.1
Created October 30, 2017 13:19
Notes on upgrading rails 5.0 to 5.1
1. Change rails version in Gemfile
> gem 'rails', '~> 5.1', '>= 5.1.4'
2. Remove Gemfile.lock
> git rm Gemfile.lock
3. Run bundle install command
> bundle install --jobs=5
4. Run rails' app update to apply changes to app
@kirankarki
kirankarki / Learning note of "Agile web development with Rails 5" book.txt
Last active October 28, 2017 04:43
Learning note of "Agile web development with Rails 5" book
<< Agile web development with Rails 5 >>
<< Notes >>
< Gems documentation server >
1. run "gem server"
2. open "localhost:8808"
< VM for RoR core development >
$ git clone https://github.com/rails/rails-dev-box.git
@kirankarki
kirankarki / Deploying ActionCable
Created August 11, 2017 11:04
Deploying ActionCable
<< Deploying ActionCable >>
1. Install redis-server
> sudo apt-get install redis-server
2. Check redis-server is installed or not
> redi-server
3. Mount actioncable url in 'routes.rb'
> Add following line to 'routes.rb'
@kirankarki
kirankarki / Deploying with Puma, Capistrano and Ngix
Last active August 11, 2017 11:00
Deploying with Puma, Capistrano and Nginx
<< Deploying with Capistrano and Capistrano3-puma >>
1. Install following gems
> capistrano, capistrano-rails, capistrano-rbenv, capistrano-bundler, capistrano3-puma
2. Generate capistrano config files
> run the following command to generate your capistrano configuration
> cap install STAGES=production
3. Require the capistrano-rails
@kirankarki
kirankarki / ar_migrate.rb
Created May 18, 2017 14:36 — forked from icyleaf/ar_migrate.rb
ActiveRecord type of integer (tinyint, smallint, mediumint, int, bigint)
# activerecord-3.0.0/lib/active_record/connection_adapters/mysql_adapter.rb
# Maps logical Rails types to MySQL-specific data types.
def type_to_sql(type, limit = nil, precision = nil, scale = nil)
return super unless type.to_s == 'integer'
case limit
when 1; 'tinyint'
when 2; 'smallint'
when 3; 'mediumint'
when nil, 4, 11; 'int(11)' # compatibility with MySQL default