Skip to content

Instantly share code, notes, and snippets.

@aarcro
aarcro / VersionOne Stories.md
Last active April 7, 2016 13:31
open solr issues for comment

#B-14918 [solr] Logging and/or metrics around searcher warming times

Since overlapping searcher is a know issue causing cluster instability, we should start logging how long cache warming is taking. Ideally there's a logging config that can enable this, less ideally a script that loads polls for stats and loads into graphite.

Actually... I just found this in New Relic. But it's only Averaged (over time) and Agrregated (Over all the hosts), I'm not terribly certain it will help pin point bad behavior, but is good for an overall view. Transaction traces do show some outliers.

============== #B-15039 [Spike] Determine how to log Solr Queries to analyze run-away queries

We are not able to analyze the querie

@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@dkarchmer
dkarchmer / cognito-developer-authenticated-client-example.py
Last active November 8, 2022 16:12
django-boto3-cognito: AWS' Cognito Developer Authenticated Identities Authflow using Django/Python/Boto3 (For building stand-alone clients)
__author__ = 'dkarchmer'
'''
This script emulates a stand-alone Python based client. It relies on Boto3 to access AWS, but
requires your Django server to have an API for your user to access Cognito based credentials
Because of Cognito, the client (this script) will only get temporary AWS credentials associated
to your user and only your user, and based on whatever you configure your AIM Policy to be.
Most Cognito examples demonstrate how to use Cognito for Mobile Apps, so this scripts demonstrate
how to create a stand-alone Python script but operating similarly to these apps.
@veselosky
veselosky / s3gzip.py
Last active May 8, 2023 21:42
How to store and retrieve gzip-compressed objects in AWS S3
# vim: set fileencoding=utf-8 :
#
# How to store and retrieve gzip-compressed objects in AWS S3
###########################################################################
#
# Copyright 2015 Vince Veselosky and contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
@ryanmaclean
ryanmaclean / disable_k400r_tap_click.md
Last active April 16, 2024 05:47
Turn off Logitech k400r Tap to Click

Turn off k400r Tap to Click

Without even installing drivers, the Logitech k400r tap-to-click functionality can be turned off by holding down the "FN" (function) key and the left click button on the trackpad.

Source

@datagrok
datagrok / README.md
Last active November 20, 2023 22:00
What happens when you cancel a Jenkins job

When you cancel a Jenkins job

Unfinished draft; do not use until this notice is removed.

We were seeing some unexpected behavior in the processes that Jenkins launches when the Jenkins user clicks "cancel" on their job. Unexpected behaviors like:

  • apparently stale lockfiles and pidfiles
  • overlapping processes
  • jobs apparently ending without performing cleanup tasks
  • jobs continuing to run after being reported "aborted"
@umrashrf
umrashrf / watermarker
Created January 25, 2014 13:42
How to watermark text over images using Python with PIL
#!/usr/bin/python
__author__ = 'umair'
FONTS = (
"/usr/share/fonts/truetype/ubuntu-font-family/Ubuntu-R.ttf",
"/usr/share/fonts/truetype/droid/DroidSerif-Regular.ttf",
"/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf",
"/home/umair/Downloads/Dosis/Dosis-ExtraBold.ttf"
)
@trongthanh
trongthanh / gist:2779392
Last active April 24, 2024 23:46
How to move a folder from one repo to another and keep its commit history
# source: http://st-on-it.blogspot.com/2010/01/how-to-move-folders-between-git.html
# First of all you need to have a clean clone of the source repository so we didn't screw the things up.
git clone git://server.com/my-repo1.git
# After that you need to do some preparations on the source repository, nuking all the entries except the folder you need to move. Use the following command
git filter-branch --subdirectory-filter your_dir -- -- all
# This will nuke all the other entries and their history, creating a clean git repository that contains only data and history from the directory you need. If you need to move several folders, you have to collect them in a single directory using the git mv command.