Skip to content

Instantly share code, notes, and snippets.

@vunb
vunb / stuns
Last active August 29, 2015 14:08 — forked from yetithefoot/stuns
{url:'stun:stun01.sipphone.com'},
{url:'stun:stun.ekiga.net'},
{url:'stun:stun.fwdnet.net'},
{url:'stun:stun.ideasip.com'},
{url:'stun:stun.iptel.org'},
{url:'stun:stun.rixtelecom.se'},
{url:'stun:stun.schlund.de'},
{url:'stun:stun.l.google.com:19302'},
{url:'stun:stun1.l.google.com:19302'},
{url:'stun:stun2.l.google.com:19302'},
@vunb
vunb / stuns
Last active August 29, 2015 14:08 — forked from zziuni/stuns
# source : http://code.google.com/p/natvpn/source/browse/trunk/stun_server_list
# A list of available STUN server.
stun.l.google.com:19302
stun1.l.google.com:19302
stun2.l.google.com:19302
stun3.l.google.com:19302
stun4.l.google.com:19302
stun01.sipphone.com
stun.ekiga.net
@vunb
vunb / README.md
Last active August 29, 2015 14:08 — forked from 8bitDesigner/README.md

Simple Static file server

Handy for when working on single-page apps

Usage

  1. npm install -g server-here
  2. here (if you're in a folder with files you want to serve)

Options

here --dir [directory to load files from] --port [port to use]

@vunb
vunb / index.js
Last active August 29, 2015 14:14 — forked from chamerling/index.js
'use strict';
var easyrtc = require('easyrtc');
var config = require('../core').config('default');
var server = {
started: false,
pub: null
};
exports = module.exports = server;
@vunb
vunb / timeago.directive.js
Last active August 29, 2015 14:14 — forked from rodyhaddad/timeago.filter.js
timeago filter and timeago directive with update automatically !
.directive('timeago',
[
'$timeout',
'$filter',
function($timeout, $filter) {
return function(scope, element, attrs) {
var time = parseInt(attrs.timeago) || new Date().getTime();
var intervalLength = 1000 * 10; // 10 seconds
var filter = $filter('timeago');
Provider Singleton Instantiable Configurable
Constant Yes No No
Value Yes No No
Service Yes No No
Factory Yes Yes No
Decorator Yes No? No
Provider Yes Yes Yes

Constant

@vunb
vunb / nginx.conf
Created January 1, 2016 14:12 — forked from thoop/nginx.conf
Official prerender.io nginx.conf for nginx
# Change YOUR_TOKEN to your prerender token and uncomment that line if you want to cache urls and view crawl stats
# Change example.com (server_name) to your website url
# Change /path/to/your/root to the correct value
server {
listen 80;
server_name example.com;
root /path/to/your/root;
index index.html;
@vunb
vunb / static_server.js
Last active January 15, 2016 15:12 — forked from ryanflorence/static_server.js
Node.JS static file web server. Put it in your path to fire up servers in any directory, takes an optional port argument.
var http = require("http"),
url = require("url"),
path = require("path"),
fs = require("fs")
port = process.argv[2] || 8888;
http.createServer(function(request, response) {
var uri = url.parse(request.url).pathname
, filename = path.join(process.cwd(), uri);
@vunb
vunb / gist:eb0c18bcc822c47ca999
Created January 22, 2016 03:53 — forked from mtigas/gist:952344
Mini tutorial for configuring client-side SSL certificates.

Client-side SSL

For excessively paranoid client authentication.

Using self-signed certificate.

Create a Certificate Authority root (which represents this server)

Organization & Common Name: Some human identifier for this server CA.

openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
@vunb
vunb / ssl.rules
Created January 22, 2016 03:54 — forked from konklone/ssl.rules
nginx TLS / SSL configuration options for konklone.com
# Basically the nginx configuration I use at konklone.com.
# I check it using https://www.ssllabs.com/ssltest/analyze.html?d=konklone.com
#
# To provide feedback, please tweet at @konklone or email eric@konklone.com.
# Comments on gists don't notify the author.
#
# Thanks to WubTheCaptain (https://wubthecaptain.eu) for his help and ciphersuites.
# Thanks to Ilya Grigorik (https://www.igvita.com) for constant inspiration.
server {