Skip to content

Instantly share code, notes, and snippets.

Avatar

Sam Adams sadams

  • London
View GitHub Profile
View DPG-Crud-Go-Cheat-Sheet.md

Get your instance HERE

Join the support channel HERE

Find more from the author @ akondas.com

Vim

Save and/or quit

View Makefile
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
View CreditCardSparkShark.md

The default is to put this on its own node so you will need to start DSE with dse cassandra -k to create a spark analytics node.

First run the https://github.com/PatrickCallaghan/datastax-creditcard-demo project to populate the Cassandra cluster (follow instructions in README). This project will populate the cluster with credit card data and allow us to filter the results from scala in the spark shell. This will run for approx one minute and finish.

In a new window start the shark shell dse spark

Now you can run the following commands the filter out the required data that is required.

case class credit_card_balance (credit_card_no: String, balance_at: Option[java.util.Date], balance: Option[Double], transaction_time: java.util.Date, transaction_id: String, location: String, items: java.util.Map[String,Double], issuer: String, amount: Double);
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active Nov 30, 2020
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)
View iterm2-solarized.md

Default

Default

Powerlevel10k

Powerlevel10k

@sadams
sadams / gist:4066708
Created Nov 13, 2012
OSX Mountain Lion TagMan MAMP (not "MAMP" the bundle) Notes
View gist:4066708

OSX Mountain Lion LAMP pear etc Install

If you are really lazy

Install your existing keychains on new mac (there are some files you can just copy, but i can't remember which so maybe give this a go): http://osxdaily.com/2012/07/05/copy-keychain-login-passwords-between-macs/

SSH

  • turn on Remote Login from Sharing in System Preferences
  • Run ssh localhost, the ctrl+c to cancel (cheap way to create the .ssh directory in home dir)
  • Copy private key into .ssh dir and call it id_rsa (make sure perms are 600 or similar)
You can’t perform that action at this time.