Skip to content

Instantly share code, notes, and snippets.

@nguyenkiidu
nguyenkiidu / nginx-vhost.conf
Created February 6, 2019 03:48 — forked from aleksandar-babic/nginx-vhost.conf
Wordpress behind NGINX reverse proxy
location /blog/ {
#auth_basic "Restricted";
#auth_basic_user_file /etc/nginx/.htpasswd;
proxy_pass https://test-blog.bitstarz.com/;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
}
tinymce.init({
selector: 'textarea',
height: 500,
menubar: false,
plugins: [
'advlist autolink lists link image charmap print preview anchor textcolor',
'searchreplace visualblocks code fullscreen',
'insertdatetime media table contextmenu paste code help wordcount'
],
toolbar: 'insert | undo redo | formatselect | bold italic backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | removeformat | help',
const earthRadius = 6371.0
async function getNearNannies(req, res, next) {
const params = req.query;
let nannies = []
let {lat, lon, distance} = req.body
lat = parseFloat(lat)
lon = parseFloat(lon)
distance = parseFloat(distance) || 1
@nguyenkiidu
nguyenkiidu / install.sh
Last active August 2, 2018 17:04 — forked from kilfu0701/install.sh
Install ruby and rails ( CentOS 7 )
yum install -y git git-core zlib zlib-devel gcc-c++ patch readline readline-devel \
libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake \
libtool bison curl sqlite-devel mysql-devel
cd ~
git clone git://github.com/sstephenson/rbenv.git .rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
class Bundle extends Component {
state = {
mod: null
}
componentWillMount() {
this.load(this.props)
}
componentWillReceiveProps(nextProps) {