Skip to content

Instantly share code, notes, and snippets.

View mshuler's full-sized avatar
💭
ヽ(´ー`)ノ

Michael Shuler mshuler

💭
ヽ(´ー`)ノ
View GitHub Profile
@mshuler
mshuler / lrsync.lua
Created December 3, 2020 16:41 — forked from kashyapp/lrsync.lua
lsyncd and configuration
local hostname = os.getenv("HOSTNAME")
local package = os.getenv("PACKAGE")
assert(hostname, "HOSTNAME env variable is not set")
assert(package, "PACKAGE env variable is not set")
local privateKey = "/usr/share/" .. package .. "/etc/id_rsa"
settings {
statusFile = "/var/run/" .. package .. "/lsyncd.stat",
statusInterval = 60,
@mshuler
mshuler / randpw
Created March 15, 2020 00:02
Generate random password string on the CLI
#!/bin/bash
# Generate random password string from all printable, non-space
# characters, using passed argument for number of characters,
# defaulting to a 16-character string. For example:
# $ randpw
# XC6Jo]2fj&f4E45n
# $ randpw 24
# :U)#J]b5[0mg)Wp@M\)l`$\y
(cassandra-3.0)mshuler@hana:~/git/cassandra$ ./bin/cqlsh
Connected to Test Cluster at 127.0.0.1:9042.
[cqlsh 5.0.1 | Cassandra 3.0.19-SNAPSHOT | CQL spec 3.4.0 | Native protocol v4]
Use HELP for help.
cqlsh> DESC CLUSTER ;
Cluster: Test Cluster
Partitioner: Murmur3Partitioner
cqlsh> CREATE KEYSPACE foo WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '1'} AND durable_writes = true;

Warm Butter Cake or 1000 Calories of Bliss

A toasty butter cake, topped with a thin layer of vanilla cheesecake, and that topped with a sweet crunchy sugar crust. It is warmed, and served with a scoop of vanilla bean ice cream.

Prep Time: 20 minutes
Cook Time: 1 hour
Total Time: 1 hour 20 minutes\

This worked out pretty well for high quality 1080p 60fps video from the 4:3 3264x2448 JPG timelapse images,
cropping the top and bottom of the original images to 16:9 widescreen:
ffmpeg -framerate 60 -pattern_type glob -i '*/*.JPG' -vf crop=in_w:in_w*9/16,scale=1920:1080 -c:v libx264 -r 60 -pix_fmt yuv420p timelapse-60fps.mp4
### BEGIN INIT INFO
# Provides: zram-disk
# Required-Start: $local_fs
# Required-Stop: $local_fs
# Default-Start: S
# Default-Stop: 0 1 6
# Short-Description: Use compressed RAM as in-memory filesystem
# Description: Use compressed RAM as in-memory filesystem
### END INIT INFO
@mshuler
mshuler / clear_jenkins_queue.groovy
Created October 8, 2015 20:42
Clear Jenkins queue of all jobs starting with 'job_name_' (use { it.task.name }.each for clearing the entire queue)
import jenkins.model.*
def q = Jenkins.instance.queue
q.items.findAll { it.task.name.startsWith('job_name_') }.each { q.cancel(it.task) }
#!/bin/sh
#
# stop manually started cassandra service, remove dtest cruft,
# and wipe data and logs
#
# set user or leave commented out for current user from env
#USER=cassandra
# set REPODIR to the git checkout, so we can clean 2.1+ data/logs
REPODIR=$HOME/git/cassandra
or "Hoosier Pie" originally from the 1800s Amish settlers. Makes one 9" pie.
1 cup sugar
1⁄2 cup all-purpose flour
1 cup half-and-half
1 cup heavy cream
1 tsp. vanilla extract
Freshly grated nutmeg, to garnish
Be awesome and make your own crust or use prepared pie crust. Refrigerate crust for at least 30 minutes prior to baking. Preheat oven to 375°
(trunk)mshuler@hana:~/git/cassandra$ grep -i Exception logs/system.log
INFO [main] 2015-07-13 15:30:35,409 MigrationManager.java:263 - Create new Keyspace: KeyspaceMetadata{name=system_distributed, params=KeyspaceParams{durable_writes=true, replication=Replication{class=org.apache.cassandra.locator.SimpleStrategy, replication_factor=3}}, tables=[org.apache.cassandra.config.CFMetaData@7bb3275f[cfId=759fffad-624b-3181-80ee-fa9a52d1f627,ksName=system_distributed,cfName=repair_history,isDense=false,isCompound=true,isSuper=false,isCounter=false,comparator=comparator(org.apache.cassandra.db.marshal.TimeUUIDType),partitionColumns=[ | coordinator exception_message exception_stacktrace finished_at parent_id range_begin range_end started_at status participants],partitionKeyColumns=[ColumnDefinition{name=keyspace_name, type=org.apache.cassandra.db.marshal.UTF8Type, kind=PARTITION_KEY, componentIndex=0, indexName=null, indexType=null}, ColumnDefinition{name=columnfamily_name, type=org.apache.cassandra.db.marshal.UTF8Ty