Skip to content

Instantly share code, notes, and snippets.

@samklr
samklr / output
Created May 16, 2019 10:40
Install transmission on WD My Cloud
FMCloud:~# wget https://gist.githubusercontent.com/MorganGeek/43ecb0ef1ac65322cd9237c16e77a5bb/raw/c8be05b2305c5b03b0e6ea1f2f27628625145371/wdmycloud-install-transmission.sh
--2017-06-17 07:54:43-- https://gist.githubusercontent.com/MorganGeek/43ecb0ef1ac65322cd9237c16e77a5bb/raw/c8be05b2305c5b03b0e6ea1f2f27628625145371/wdmycloud-install-transmission.sh
Resolving gist.githubusercontent.com (gist.githubusercontent.com)... 151.101.36.133
Connecting to gist.githubusercontent.com (gist.githubusercontent.com)|151.101.36.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1136 (1.1K) [text/plain]
Saving to: `wdmycloud-install-transmission.sh'
100%[===================================================================================================================>] 1,136 --.-K/s in 0.001s

Cryptographic Best Practices

Putting cryptographic primitives together is a lot like putting a jigsaw puzzle together, where all the pieces are cut exactly the same way, but there is only one correct solution. Thankfully, there are some projects out there that are working hard to make sure developers are getting it right.

The following advice comes from years of research from leading security researchers, developers, and cryptographers. This Gist was [forked from Thomas Ptacek's Gist][1] to be more readable. Additions have been added from

@samklr
samklr / 70-ec2-nvme-devices.rules
Created January 25, 2019 12:29 — forked from jalaziz/70-ec2-nvme-devices.rules
AWS EBS NVMe udev rules
# Copyright (C) 2006-2016 Amazon.com, Inc. or its affiliates.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# A copy of the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompanying this file. This file is
@samklr
samklr / clean-slate.sh
Created December 7, 2018 10:37 — forked from noisesmith/clean-slate.sh
clean some things from zk, kafka, mongo
#!/bin/sh
# vars
## EDITOR/VISUAL - what process to use to pick targets interactively
## ZK_WL - regex for zookeeper paths not to remove
## KAFKA_WL - regex for kafka topics not to remove
## MONGO_WL - regex for mongo item ids not to remove
# set -x
@samklr
samklr / article.md
Last active November 12, 2018 23:10 — forked from jkpl/article.md
Error handling pitfalls in Scala

Error handling pitfalls in Scala

There are multiple strategies for error handling in Scala.

Errors can be represented as [exceptions][], which is a common way of dealing with errors in languages such as Java. However, exceptions are invisible to the type system, which can make them challenging to deal with. It's easy to leave out the necessary error handling, which can result in unfortunate runtime errors.

@samklr
samklr / article.org
Created November 12, 2018 23:10 — forked from jkpl/article.org
Enforcing invariants in Scala datatypes

Enforcing invariants in Scala datatypes

Scala provides many tools to help us build programs with less runtime errors. Instead of relying on nulls, the recommended practice is to use the Option type. Instead of throwing exceptions, Try and Either types are used for representing potential error scenarios. What’s common with these features is that they’re used for capturing runtime features in the type system, thus lifting the runtime scenario handling to the compilation phase: your program doesn’t compile until you’ve explicitly handled nulls, exceptions, and other runtime features in your code.

In his “Strategic Scala Style” blog post series,

@samklr
samklr / kafka-cheat-sheet.md
Created November 9, 2018 12:45 — forked from sahilsk/kafka-cheat-sheet.md
Apache Kafka Cheat Sheet

Kafka Cheat Sheet

Display Topic Information

$ kafka-topics.sh --describe --zookeeper localhost:2181 --topic beacon
Topic:beacon	PartitionCount:6	ReplicationFactor:1	Configs:
	Topic: beacon	Partition: 0	Leader: 1	Replicas: 1	Isr: 1
	Topic: beacon	Partition: 1	Leader: 1	Replicas: 1	Isr: 1
@samklr
samklr / TODO
Created September 11, 2018 07:52 — forked from perrygeo/TODO
Ansible playbook for a full dev environment
TODO
implement security measures
git config
config files
full sublimetext config
set up openvpn
rdesktop and network drive to terra
set up evolution
RStudio