Skip to content

Instantly share code, notes, and snippets.

@anismiles
anismiles / hive_csv2avro.py
Created November 12, 2020 20:45 — forked from vepetkov/hive_csv2avro.py
Convert a CSV to Hive DDL + AVRO Schema (with type inference)
#!/usr/bin/python
import pandas
import sys
import argparse
import string
import subprocess
import json
import textwrap
import re
@anismiles
anismiles / golang_job_queue.md
Created February 5, 2018 17:15 — forked from harlow/golang_job_queue.md
Job queues in Golang
package com.vast.example
import java.net.InetSocketAddress
import java.util.UUID
import java.util.concurrent.{Executors, TimeUnit}
import com.google.common.base.Splitter
import com.twitter.finagle.http.Http
import com.twitter.finagle.builder.{Server, ServerBuilder}
import com.twitter.finagle.service.TimeoutFilter
import com.twitter.finagle.{Service, SimpleFilter, GlobalRequestTimeoutException}
#!/bin/bash
#
# MongoDB Backup Script
# VER. 0.1
# Note, this is a lobotomized port of AutoMySQLBackup
# (http://sourceforge.net/projects/automysqlbackup/) for use with
# MongoDB.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
redis-cli KEYS "prefix:*" | xargs redis-cli DEL
@anismiles
anismiles / jetty
Created May 29, 2013 19:55 — forked from peterc/jetty
#!/usr/bin/env bash
#
# Startup script for jetty under *nix systems (it works under NT/cygwin too).
# To get the service to restart correctly on reboot, uncomment below (3 lines):
# ========================
# chkconfig: 3 99 99
# description: Jetty 7 webserver
# processname: jetty
# ========================
@anismiles
anismiles / jetty
Created May 29, 2013 19:55 — forked from peterc/jetty
#!/usr/bin/env bash
#
# Startup script for jetty under *nix systems (it works under NT/cygwin too).
# To get the service to restart correctly on reboot, uncomment below (3 lines):
# ========================
# chkconfig: 3 99 99
# description: Jetty 7 webserver
# processname: jetty
# ========================
http {
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=one:8m max_size=3000m inactive=600m;
proxy_temp_path /var/tmp;
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
gzip on;
gzip_comp_level 6;