This file contains hidden or 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 { | |
server_name abc.com; | |
return 301 http://xyz.com; | |
} | |
This file contains hidden or 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 { | |
server_name abc.com; | |
listen 80; | |
access_log /var/log/nginx/access.log; | |
error_log /var/log/nginx/error.log; | |
root /home/app/html-app/dist; | |
index index.html index.htm; |
This file contains hidden or 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; | |
server_name abc.com; | |
location / { | |
proxy_pass http://localhost:2222; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection 'upgrade'; | |
proxy_set_header Host $host; |
This file contains hidden or 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
upstream app { | |
# Path to Puma SOCK file, as defined previously | |
server unix:/home/app/abc-app/shared/sockets/puma.sock fail_timeout=0; | |
} | |
server { | |
listen 80; | |
server_name localhost; | |
root /home/app/abc-app/public; |
This file contains hidden or 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 | |
while: | |
do | |
node server.js | |
echo "server crached!" | |
sleep 1 | |
done |
This file contains hidden or 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
<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); | |
/** | |
* Description of ISBA Library | |
* | |
* @package Library | |
* @author Jamael Tanveer Nayon <[email protected]> | |
* @author Eftakhairul Islam <[email protected]> http://eftakhairul.com | |
* @website Changebd.net | |
*/ |
This file contains hidden or 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
##------------------------------------ ## | |
# -- new-alias -- # | |
# creates new alias & writes to file # | |
# $1 = alias new # | |
# $2 = alias definition # | |
##------------------------------------ ## | |
new-alias () { | |
if [ -z "$1" ]; then | |
echo "alias name:" | |
read NAME |
This file contains hidden or 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
class RemoveOldDuplicatePhoneNumberReference < ActiveRecord::Migration | |
def change | |
#fetch all user and remove the cross reference for duplicate phone number | |
User.real_users.find_in_batches.each(:batch_size => 100) do |batch| | |
batch.each do |u| | |
if u.annotations[:users_with_the_same_phone] | |
# remove other users' reference who are associated with this user |
This file contains hidden or 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
<VirtualHost *:80> | |
ServerAdmin [email protected] | |
DocumentRoot /home/eftakhairul/codes/php/projects/kondar-global/ | |
ServerName www.kgt-global.local | |
ErrorLog ${APACHE_LOG_DIR}/error.log | |
CustomLog ${APACHE_LOG_DIR}/access.log combined | |
<Directory /home/eftakhairul/codes/php/projects/kondar-global/> | |
Require all granted | |
Options Indexes FollowSymLinks MultiViews | |
AllowOverride All |
This file contains hidden or 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
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "hashicorp/precise64" | |
config.vm.network "private_network", ip: "192.168.0.210" | |
config.vm.synced_folder "./dev", "/var/www", create: true | |
config.vm.provision "shell", path: "https://gist.githubusercontent.com/EmranAhmed/10682844/raw/13d127a5982fa47331aa019ac2d27b9c08f86229/vagrant-provision.sh" | |
end |