Skip to content

Instantly share code, notes, and snippets.

View full-of-foo's full-sized avatar
💭
I'm currently working 150% of the time as a manager. No code 👎

Toeknee full-of-foo

💭
I'm currently working 150% of the time as a manager. No code 👎
View GitHub Profile

app.js

$(function() {
    console.log('In app.js'); // TODO - remove later

    $('.icon-trash').click(function() {
        console.log('Clicked delete for row: ', this); // TODO - remove later

       // TODO - lets explore making the XHR request later
 });
@full-of-foo
full-of-foo / Dockerfile
Created February 7, 2016 15:42
Stand-alone Hadoop Container
# Single cluster Hadoop tutorial
# - https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/SingleCluster.html
FROM ubuntu:14.04
MAINTAINER Anthony Troy
# Linux deps
ENV DEBIAN_FRONTEND noninteractive
RUN sed -i 's/# \(.*multiverse$\)/\1/g' /etc/apt/sources.list
RUN apt-get update
@full-of-foo
full-of-foo / iptableflip.sh
Created October 23, 2015 23:30 — forked from lewisd32/iptableflip.sh
Snippet of Unbounce script for restarting HAProxy with zero downtime
echo "Flipping tables! (╯°□°)╯︵ ┻━┻"
num_rules=3
real=3 # exposed to the ELB as port 443
test=4 # used to install test certs for domain verification
health=5 # used by the ELB healthcheck
blue_prefix=855
green_prefix=866
def assert_valid_persona_request():
"""Send the assertion to Mozilla's verifier service"""
assertion_key = flask.request.headers.get("PERSONA_ASSERTION")
if assertion_key is None:
raise PersonaAuthenticationError()
audience = flask.request.headers.get("Origin", None)
if audience is None:
audience = flask.request.url_root
assertion = {"assertion": assertion_key, "audience": audience}
void calculation(global float *A, global float *B, int n)
{
int i = get_global_id(0);
int j = get_global_id(1);
int k;
float value = 0.0;
for (k=0; k<n; k++)
value += A[j*n+k] * A[k*n+i];
/* gcc -std=c99 -g -Wall -fopenmp -o trap trap.c */
#include <stdio.h>
#include <math.h>
#include <omp.h>
double f(double x){ return (x*x + 2*sin(x)); }
void main(){
double integral, step;
double a = 0.0; /*left*/
"""[GoodData][2115] Add _dashboard JSON column business model
Revision ID: 94fa184253c
Revises: b28edc5f867
Create Date: 2014-12-29 20:09:59.721904
"""
# revision identifiers, used by Alembic.
revision = '94fa184253c'