Skip to content

Instantly share code, notes, and snippets.

View eunleem's full-sized avatar

Eddie Leem eunleem

View GitHub Profile
@dwelch2344
dwelch2344 / wordpress.sh
Created February 3, 2015 17:35
A simple wordpress setup
# As root
apt-get update
apt-get install -y nginx mysql-server php5-fpm php5-mysql php5-gd libssh2-php unzip
mysql_install_db
mysql_secure_installation
echo 'cgi.fix_pathinfo=0' >> /etc/php5/fpm/php.ini
mysql -u root -p -e "DROP DATABASE IF EXISTS wordpress; CREATE DATABASE wordpress; CREATE USER wpuser@localhost IDENTIFIED BY 'WP_PASSWORD_HERE'; GRANT ALL PRIVILEGES ON wordpress.* TO wpuser@localhost; FLUSH PRIVILEGES;"
wget wordpress.org/latest.zip
unzip latest.zip
rm latest.zip
@icchan
icchan / geospatial-querying-with-go-and-mongodb.go
Created October 18, 2014 07:37
Geospatial Querying with GoLang and MongoDB
package main
import (
"encoding/json"
"fmt"
"gopkg.in/mgo.v2"
"gopkg.in/mgo.v2/bson"
"log"
)
@runeb
runeb / js-exif-rotate.html
Created May 23, 2014 10:49
Auto-rotate images locally in the browser by parsing exif data
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<input id="file" type="file" accept="image/*" />
<br/>
<h2>As read:</h2>
<img id="placeholder1" width=300/><br/>
<h2>Rotated by exif data:</h2>
<img id="placeholder2" width=300/>
<script>
@mattetti
mattetti / multipart_upload.go
Last active July 18, 2024 17:31
Example of doing a multipart upload in Go (golang)
package main
import (
"bytes"
"fmt"
"io"
"log"
"mime/multipart"
"net/http"
"os"