Skip to content

Instantly share code, notes, and snippets.

View audriusrudalevicius's full-sized avatar

Audrius audriusrudalevicius

View GitHub Profile
@leon
leon / nginx.conf
Created June 29, 2012 16:34
Nginx PHP-FPM Symfony 2 minimal config
server {
listen 80;
server_name localhost;
root /home/website/web;
rewrite ^/app\.php/?(.*)$ /$1 permanent;
try_files $uri @rewriteapp;
location @rewriteapp {
@marktheunissen
marktheunissen / pedantically_commented_playbook.yml
Last active June 15, 2025 15:49 — forked from phred/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
This playbook has been removed as it is now very outdated.
var element = document.querySelector('#textinput');
element.addEventListener('keyup', handleText, false);
function handleText (e) {
// Get the text
var text = e.target.value;
// Query the service via a Promise API
queryService(text).then(function (results) {
// Handle completion
@RedBeard0531
RedBeard0531 / functions.js
Created February 22, 2012 20:13
Min, Max, Sum, Count, Avg, and Std deviation using MongoDB MapReduce
// derived from http://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Parallel_algorithm
function map() {
emit(1, // Or put a GROUP BY key here
{sum: this.value, // the field you want stats for
min: this.value,
max: this.value,
count:1,
diff: 0, // M2,n: sum((val-mean)^2)
});
@aaronperkins
aaronperkins / PlanetMeshGen.java
Created February 9, 2012 00:34
Simple Planet Generator for jMonkeyEngine
import com.jme3.math.Vector3f;
import com.jme3.scene.Mesh;
import com.jme3.scene.VertexBuffer.Type;
import com.jme3.util.BufferUtils;
import com.jme3.math.FastMath;
import java.util.List;
import java.util.ArrayList;
import java.util.Random;