Skip to content

Instantly share code, notes, and snippets.

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
View pronto.md

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 Feb 7, 2016
Stand-alone Hadoop Container
View Dockerfile
# 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 Oct 23, 2015 — forked from lewisd32/iptableflip.sh
Snippet of Unbounce script for restarting HAProxy with zero downtime
View iptableflip.sh
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
View assert_persona.py
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}
View cl_calc.c
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];
View trap.c
/* 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*/
View migration.py
"""[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'