This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# add nginx signing key | |
sudo wget http://nginx.org/keys/nginx_signing.key | |
sudo apt-key add nginx_signing.key | |
echo '================================' | |
# install nginx | |
cd /etc/apt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
listen [::]:80; | |
server_name 172.105.222.69; | |
root /var/www/kementrian-front-end; | |
index index.html; | |
location / { | |
try_files $uri /index.html; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function encodeEmail() { | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
var sheet = ss.getSheets()[0]; | |
var range = sheet.getDataRange(); | |
var lastRow = range.getLastRow(); | |
var values = range.getValues(); | |
var col = values[0].indexOf('Email'); | |
var colValues = sheet.getRange(2, col + 1, lastRow - 1).getValues(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!^ first argument | |
!$ last argument | |
!* all arguments | |
!:2 second argument | |
!:2-3 second to third arguments | |
!:2-$ second to last arguments | |
!:2* second to last arguments | |
!:2- second to next to last arguments |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# All Vagrant configuration is done below. The "2" in Vagrant.configure | |
# configures the configuration version (we support older styles for | |
# backwards compatibility). Please don't change it unless you know what | |
# you're doing. | |
Vagrant.configure("2") do |config| | |
# this will be db name and the directory project resides |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function format(num) { | |
let arr = num.toString().split('').reverse(); | |
let j = 0; | |
let result = ''; | |
for(let i = 0; i < arr.length; i++) { | |
j = i % 3; | |
result = arr[i] + result; | |
if(j == 2 && (i < arr.length - 1)) { |