Skip to content

Instantly share code, notes, and snippets.

@robenalt
robenalt / gist:3802791
Created September 29, 2012 00:59
Fresh Mountain Lion OS X 10.8 DP3
package mllib
import scala.util.Random
import org.jblas.DoubleMatrix
import org.apache.spark.SparkContext
import org.apache.spark.rdd._
import org.apache.spark.SparkConf
import org.apache.spark.SparkContext._
@robenalt
robenalt / iterm.scpt
Last active June 6, 2016 18:35 — forked from gnachman/iterm.scpt
Fix docker quickstart terminal for iTerm2 version 3
on write_to_file(this_data, target_file, append_data)
try
set the target_file to the target_file as string
set the open_target_file to open for access file target_file with write permission
if append_data is false then set eof of the open_target_file to 0
write this_data to the open_target_file starting at eof
close access the open_target_file
return true
on error
try
@robenalt
robenalt / iterm2-solarized.md
Created July 18, 2016 12:50 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + oh my zsh + solarized + Meslo powerline font (OS X / macOS)

Solarized

@robenalt
robenalt / read-flowfile-contents.py
Created September 1, 2017 20:16 — forked from ijokarumawak/read-flowfile-contents.py
Example Python script to use from NiFi ExecuteScript processor which reads the first line from an incoming flow file.
from org.apache.nifi.processors.script import ExecuteScript
from org.apache.nifi.processor.io import InputStreamCallback
from java.io import BufferedReader, InputStreamReader
class ReadFirstLine(InputStreamCallback) :
__line = None;
def __init__(self) :
pass
@robenalt
robenalt / helloworld-win32-service.py
Created September 23, 2017 00:29 — forked from drmalex07/helloworld-win32-service.py
An example Windows service implemented with pywin32 wrappers. #python #windows-service #pywin32
import win32serviceutil
import win32service
import win32event
import servicemanager
import socket
import time
import logging
logging.basicConfig(
filename = 'c:\\Temp\\hello-service.log',
@robenalt
robenalt / pedantically_commented_playbook.yml
Created October 19, 2017 16:12 — forked from marktheunissen/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.