Skip to content

Instantly share code, notes, and snippets.

View Keimille's full-sized avatar

Keith Miller Keimille

View GitHub Profile
@chrisjlee
chrisjlee / weather.php
Created August 9, 2012 20:50
php script to consume google weather api webservice
<?php
/*
* Google weather service class
* @author Chris J. Lee
*/
class ServiceContainer {
protected $_baseurl;
protected $result;
abstract function __construct() {}
@erikaheidi
erikaheidi / nginx-userdata-centos.sh
Created December 3, 2015 18:03
Simple shell script to install Nginx on CentOS using DigitalOcean's metadata/userdata
#!/bin/bash
yum install epel-release -y
yum install nginx -y
export HOSTNAME=$(curl -s http://169.254.169.254/metadata/v1/hostname)
export PUBLIC_IPV4=$(curl -s http://169.254.169.254/metadata/v1/interfaces/public/0/ipv4/address)
echo Droplet: $HOSTNAME, IP Address: $PUBLIC_IPV4 > /usr/share/nginx/html/index.html
systemctl enable nginx
systemctl start nginx
@soheilhy
soheilhy / nginxproxy.md
Last active March 22, 2024 08:54
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@winuxue
winuxue / puppeteer-ubuntu-1804.md
Created May 22, 2019 01:15
Solution for common dependences issues using puppeteer in ubuntu 18.04 (Bionic)

puppeteer dependeces in ubuntu 18.04 (Bionic)

error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory

sudo apt-get install libnss3

error while loading shared libraries: libXss.so.1: cannot open shared object file: No such file or directory

sudo apt-get install libxss1