Skip to content

Instantly share code, notes, and snippets.

@Galarius
Galarius / django_test_api.py
Last active August 29, 2015 14:10
Test api with auth-key and user
# Every request to api requires an auth-key in header in this example.
# Example of how to perform api testing with such authentication.
# django 1.7
from django.apps import apps
from django.conf import settings
from django.test.client import RequestFactory
from api.user.views import UserKeyView
@padde
padde / openvpn.md
Last active June 6, 2025 21:03
OpenVPN on Ubuntu 12.10 at DigitalOcean

OpenVPN on Ubuntu 12.10 at DigitalOcean

Install OpenVPN

sudo apt-get install openvpn

Generate Server Certificates

sudo cp -r /usr/share/doc/openvpn/examples/easy-rsa/2.0 /etc/openvpn/easy-rsa2

cd /etc/openvpn/easy-rsa2

@ngocdaothanh
ngocdaothanh / gist:3764694
Created September 22, 2012 00:43
Scala Assignment: Recursion
package recfun
import scala.collection.mutable.ListBuffer
import common._
/** https://class.coursera.org/progfun-2012-001/assignment/view?assignment_id=4 */
object Main {
def main(args: Array[String]) {
println("Pascal's Triangle")
for (row <- 0 to 10) {