Skip to content

Instantly share code, notes, and snippets.

@andyzickler
andyzickler / disccopy42.key.yaml
Created January 11, 2023 22:50
Disk Copy 4.2 Kaitai
meta:
id: diskcopy42
file-extension: img
endian: be
bit-endian: be
doc-ref: https://web.archive.org/web/20201028142058/https://wiki.68kmla.org/DiskCopy_4.2_format_specification
seq:
- id: name
type: pstring
- id: padding
# Get the K8S_URL and Token from Rancher Cluster level Kubeconfig (logged in as the CI user)
export K8S_URL=https://<rancherurl>/k8s/clusters/<clusterid>
export TOKEN=<RANCHERTOKEN>
export NAMESPACE=<kubernetes-namespace>
# Typically these are identical. Check from the YAML file of your deployment.
export DEPLOYMENT=<deployment-name>
export CONTAINER=<container-name>
# The docker-image-version must be updated every time you built a new container.
@andreldm
andreldm / AprConfiguration.java
Created February 1, 2017 12:24
APR on Spring Boot
import org.apache.catalina.LifecycleListener;
import org.apache.catalina.core.AprLifecycleListener;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.embedded.EmbeddedServletContainerFactory;
import org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* NOTE: You also need to install APR on your system, on Arch Linux the package is called `tomcat-native`.
@ishults
ishults / Grails_Groovy_Versions.txt
Last active June 14, 2024 08:39
List of Groovy versions for Grails
// Compiled by Igor Shults
// Last Updated: July 23, 2020
GRAILS GROOVY SOURCE
4.1.0 2.5.14 https://github.com/grails/grails-core/blob/v4.1.0/gradle.properties
4.0.4 2.5.6
4.0.3 2.5.6
4.0.2 2.5.6
4.0.1 2.5.6
4.0.0 2.5.6 https://github.com/grails/grails-core/blob/v4.0.0/build.gradle
@benorama
benorama / .travis.yml
Last active January 10, 2023 18:37
Grails AWS Elastic Beanstalk deployment script
language: groovy
jdk: oraclejdk8
sudo: false # To use new Travis docker-based infrastructure
env:
global:
# $AWS_ACCESS_KEY_ID
- secure: "..."
# $AWS_SECRET_ACCESS_KEY
- secure: "..."
@bfg100k
bfg100k / snapRAID_helper.sh
Last active May 22, 2024 13:49
Bash helper script to help with the automation of routine snapRAID tasks. Add it as a cron job to automate the routine tasks of running sync and scrub. Script will optionally send you email of status and issues encountered during the run.
#!/bin/bash
#######################################################################
# This is a helper script that keeps snapraid parity info in sync with
# your data and optionally verifies the parity info. Here's how it works:
# 1) It first calls diff to figure out if the parity info is out of sync.
# 2) If parity info is out of sync, AND the number of deleted files exceed
# X (configurable), it triggers an alert email and stops. (In case of
# accidental deletions, you have the opportunity to recover them from
# the existing parity info)
# 3) If partiy info is out of sync, AND the number of deleted files exceed X
{
"title": "Apache and Tomcat Logs",
"services": {
"query": {
"list": {
"0": {
"query": "apache !tomcat !static",
"alias": "",
"color": "#7EB26D",
"id": 0,
@fnichol
fnichol / README.md
Last active April 27, 2023 15:24
Auto-enable Local HTTP Caching in Test Kitchen

Auto-enable Local HTTP Caching in Test Kitchen

Note: total experiment and hack, looks nasty, could be awesome:

Setup

  • Drop the kitchen.local.yml into $HOME/.kitchen/config.yml
  • Install polipo (with Mac: brew install polipo, with Ubuntu: apt-get install polipo)
  • Drop polipo-start and polipo-console somewhere useful (perhaps $HOME/bin?)
anonymous
anonymous / gist:4374155
Created December 25, 2012 16:48
Quick and dirty way to sort pictures like picasa does via bash: # 10.8 doesnt have a recent ls, so install gnuls as gls(default name) sudo port install coreutils +with_default_names
gls -l --time-style="+%Y-%m-%d" | while read LINE; do
fdate=`echo $LINE | awk -F" " {'print $6'}`
fname=`echo $LINE | awk -F" " {'print $7'}`
echo "mkdir $fdate"; echo "mv $fname $fdate"
done | bash
@ruckus
ruckus / gist:2293434
Created April 3, 2012 16:36
Basic setup of WAL-E for continuous archiving and recovery

WAL-E needs to be installed on all machines, masters and slaves.

How to install WAL-E

Only one machine, the master, writes WAL segments via continuous archiving. The configuration for the master postgresql.conf is:

archive_mode = on
archive_command = 'envdir /etc/wal-e.d/env wal-e wal-push %p'
archive_timeout = 60