Skip to content

Instantly share code, notes, and snippets.

eliangcs / gist:1341253
Created Nov 5, 2011
Creating a Triangle Mesh with 3ds Max SDK
View gist:1341253
TriObject *createTriangleMesh(const std::vector<Point3> &points,
const std::vector<Point3> &normals,
const std::vector<Point2> &uvs,
const std::vector<int> &triangleVertIndices)
TriObject *triobj = CreateNewTriObject();
if (triobj == NULL)
return NULL;
assert(points.size() == normals.size() && normals.size() == uvs.size());
eliangcs / secure-django-admin.rst
Last active Jun 8, 2021
Secure Django admin with self-signed SSL client certificate in Nginx.
View secure-django-admin.rst
eliangcs / gist:6682975
Created Sep 24, 2013
phpmyadmin on Nginx
View gist:6682975
location /phpmyadmin {
root /usr/share/;
index index.php index.html index.htm;
location ~ ^/phpmyadmin/(.+\.php)$ {
try_files $uri =404;
root /usr/share/;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
View sublime-prefs.js
// Sublime Text
"color_scheme": "Packages/Color Scheme - Default/Twilight.tmTheme",
"font_face": "DejaVu Sans Mono",
"font_size": 10,
"translate_tabs_to_spaces": true,
eliangcs / ssh-config
Created Apr 10, 2014
Auto select SSH key
View ssh-config
# ~/.ssh/config
Host *
IdentityFile ~/.ssh/us-east-1.pem
Host *
IdentityFile ~/.ssh/ap-northeast-1.pem
eliangcs /
Last active May 28, 2018
Install PostgreSQL 9.3 on Ubuntu 12.04 LTS
sudo sh -c 'echo "deb `lsb_release -cs`-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - | sudo apt-key add -
sudo apt-get update
sudo apt-get upgrade
# sudo apt-get install postgresql-9.3
# sudo apt-get install postgresql-client-9.3
eliangcs /
Last active Aug 29, 2015
Scrapy dependencies on Ubuntu
sudo apt-get install -y gcc python-dev libffi-dev libssl-dev libxml2-dev libxslt1-dev build-essential
#!/usr/bin/env python
# -*- coding: utf-8 -*-
SleekXMPP: The Sleek XMPP Library
Copyright (C) 2010 Nathanael C. Fritz
This file is part of SleekXMPP.
See the file LICENSE for copying permission.
eliangcs /
Last active Jul 23, 2021
Basic security setup for a brand new Linode

Basic Security Setup for a Brand New Linode


When you start a clean Linode, it isn't secured in the following aspects:

  • Allows root SSH login
  • Uses password authentication on SSH
  • Doesn't have a firewall
eliangcs /
Last active Sep 15, 2021
Cheatsheet: pyenv, virtualenvwrapper, and pip

Cheatsheet: pyenv, virtualenvwrapper, and pip

Installation (for Mac OS)

Install pyenv with brew

brew update
brew install pyenv