Skip to content

Instantly share code, notes, and snippets.

Benjamin Fleischer bf4

Block or report user

Report or block bf4

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@bf4
bf4 / jdbc_sample.rb
Created Apr 18, 2018 — forked from rwjblue/jdbc_sample.rb
Convert JDBC ResultSet into Ruby Hash with JRuby
View jdbc_sample.rb
require './lib/adsjdbc-10.10.0.28.jar'
java_import java.sql.Driver
java_import java.sql.DriverManager
java_import 'com.extendedsystems.jdbc.advantage.ADSDriver'
class AdsAdapter
def initialize(connect_string)
@connect_string = connect_string
end
View 0.README-Linux-Command-Line-Cheat-Sheet.md

A collection of Linux commands and concepts I tend to forget

View gist:e9a7016e4c5dca2d6b8a19d6e10d23c0

Step 0. Install Docker

Step 1. For your chosen project, decide where you want to store your notebooks and files in a workingfolder.

Step 2. Open that folder in the terminal cd workingfolder

Step 3. Run this command

docker run -it --rm -v $PWD:/home/jovyan/work -p 8888:8888 jupyter/all-spark-notebook
View parser-combinator.md

What

A technique for writing parsers.

Why

  • Easy to understand
  • Generally applicable
  • Full power of the programming language at your disposal
  • Declarative
@bf4
bf4 / ams.rb
Created Apr 3, 2017 — forked from sineed/ams.rb
Upgrade AMS from 0.9.0 to 0.10.0
View ams.rb
module AMS
module V09
class Serializer < ActiveModel::Serializer
def serializable_hash(adapter_options = nil,
options = {},
adapter_instance = self.class.serialization_adapter_instance)
object.nil? ? nil : super
end
end
View learn_clojure_recipe.md
@bf4
bf4 / go_kinesis_with_structs.go
Created Mar 14, 2017 — forked from pricees/go_kinesis_with_structs.go
Go + AWS Kinesis + Encode/Decode Structs
View go_kinesis_with_structs.go
/**
NOTE:
Assumes env contains aws credentials:
AWS_ACCESS_KEY_ID or AWS_ACCESS_KEY
AWS_SECRET_KEY_ID or AWS_SECRET_KEY
and AWS_REGION_NAME (e.g. 'US-EAST-1')
see EnvAuth() below
*/
@bf4
bf4 / dontforget.bash
Created Feb 20, 2017 — forked from ttscoff/dontforget.bash
Quick reminders from Terminal (bash)
View dontforget.bash
#!/bin/bash
# dontforget
#
# A stupid script for short term reminders in bash
#
# Arguments just need to contain a number and a bunch of words.
#
# The number can be anywhere in the arguments, but there shouldn't
# be any other numeric digits.
#
@bf4
bf4 / _dev_badge.html.slim
Created Feb 1, 2017 — forked from stevenharman/_dev_badge.html.slim
A simple badge that shows your Rails environment.
View _dev_badge.html.slim
/ In app/views/shared/
#dev-badge
span= Rails.env
span It ain't production!
You can’t perform that action at this time.