Skip to content

Instantly share code, notes, and snippets.

View mgmgpyaesonewin's full-sized avatar
🐒
coding

Pyae Sone Win mgmgpyaesonewin

🐒
coding
View GitHub Profile
before_script:
- echo "Before script"
- cd /var/www/html/{your-project-name} #your project path
building:
stage: build
script:
- git reset --hard
- git pull origin develop
- composer install
- cp .env.example .env
How to set SSH key for multiple users?
Switch to the user:
su a
Generate SSH keys:
ssh-keygen
{hit enter a few times}
Create/edit authorized keys file:
Fress install server setup
https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-18-04
Setting Up Firewall
https://www.digitalocean.com/community/tutorials/how-to-set-up-a-firewall-with-ufw-on-ubuntu-18-04
install docker

Render your theme:

tutor config render --extra-config ./indigo/config.yml ./indigo/theme "$(tutor config printroot)/env/build/openedx/themes/indigo"

Rebuild the Openedx docker image:

tutor images build openedx

Restart your platform:

$faker = \Faker\Factory::create();
$tomorrow = Carbon::createFromTimeStamp($faker->dateTimeBetween('now', '+01 days')->getTimestamp());
$end_time = Carbon::createFromFormat('Y-m-d H:i:s', $tomorrow)->addHours(3);
// routerlink-with-string-interpolation-in-vue
<router-link :to='`/patients/detail/${props.row.id}`'>
<i class="fa fa-eye" aria-hidden="true"></i>
</router-link>
@mgmgpyaesonewin
mgmgpyaesonewin / cmd.sh
Last active August 5, 2019 06:19
Linux useful cmd
sudo service php7.2-fpm restart
for display enabled php version in terminal by php -v. we need to set update cli version of php.
use below command to update php cli version
// change terminal (cli) version (7.2 to 7.1)
sudo update-alternatives --set php /usr/bin/php7.1
@mgmgpyaesonewin
mgmgpyaesonewin / Ubuntu_Nginx_PM2_Nodejs.md
Last active March 14, 2019 11:40
Ubuntu / Nginx / PM2 / Nodejs installation

Nginx

Install

  • sudo apt-get install nginx

CMD

  • sudo systemctl status nginx
  • sudo systemctl start nginx
  • sudo systemctl restart nginx
  • sudo nginx -t # Check nginx syntax.

To Run, use


./vendor/bin/phpunit

function renderFullPage(html, preloadedState) {
return `
<!doctype html>
<html>
<head>
<title>Redux Universal Example</title>
</head>
<body>
<div id="root">${html}</div>
<script>