I hereby claim:
- I am jamesridgway on github.
- I am jamesridgway (https://keybase.io/jamesridgway) on keybase.
- I have a public key whose fingerprint is AD33 D275 C4EC C3EE 2600 B1F4 5B11 C8A3 F3BC C4EB
To claim this, I am signing this object:
=begin | |
---------- | |
KMS Encyrption/Decryption Example | |
This is an example of how to use KMS to encrypt and decrypt data. This script will take the plaintext or ciphertext | |
via stdin (base 64 encoded). | |
Encrypt example: |
var currentOps = db.currentOp(); | |
print("Index Status:"); | |
if(!currentOps.inprog || currentOps.inprog.length < 1) { | |
print("No operations in progress"); | |
} else { | |
for(o in currentOps.inprog) { | |
var op = currentOps.inprog[o]; | |
if(op.msg && op.msg.match(/Index Build/)) { | |
print(op.opid+' - '+op.msg); |
require 'octokit' | |
client = Octokit::Client.new(:access_token => ENV['GITHUB_ACCESS_TOKEN']) | |
repos = client.repos({}, query: {type: 'owner', sort: 'asc'}).select { |repo| !repo.fork } | |
language_stats = {} | |
repos.each do |repo| | |
repo_id = "#{repo.owner.login}/#{repo.name}" | |
repo_languages = client.languages(repo_id).to_h | |
language_stats.merge!(repo_languages){ |k, a_value, b_value| a_value + b_value } |
Date.prototype.asStartOfWeek = function(start) { | |
start = start || 0; | |
var today = new Date(this.setHours(0, 0, 0, 0)); | |
var day = today.getDay() - start; | |
var date = today.getDate() - day + (day == 0 ? -6 : 1); | |
return new Date(today.setDate(date)); | |
} | |
Date.prototype.asEndOfWeek = function(start) { | |
start = start || 0; |
I hereby claim:
To claim this, I am signing this object:
# Gnome 3 - based on https://blog.samalik.com/make-your-gnome-title-bars-smaller/ | |
.header-bar.default-decoration { | |
padding-top: 3px; | |
padding-bottom: 3px; | |
font-size: 0.8em; | |
} | |
.header-bar.default-decoration .button.titlebutton { | |
padding: 0px; | |
} |
import os | |
import re | |
import urllib | |
from argparse import ArgumentParser | |
from time import sleep | |
from selenium import webdriver | |
from selenium.webdriver import ActionChains | |
def instance = Jenkins.getInstance() | |
def pluginManager = instance.getPluginManager() | |
def plugins = pluginManager.getPlugins() | |
def installedPlugins = [] | |
plugins.each { | |
installedPlugins << it.getShortName() | |
} |
""" | |
NestedDict wrapper | |
""" | |
class NestedDict(dict): | |
def __getitem__(self, key_namespace): | |
if "." not in key_namespace: | |
return super(NestedDict, self).__getitem__(key_namespace) | |
keys = key_namespace.split('.') | |
val = self | |
for key in keys: |
#!/bin/bash | |
# Can be used as follows to copy all files with a normal exposure to a 'normal_exposure' folder: | |
# ./normal_exposure.sh | xargs -I '{}' cp '{}' normal_exposure/ | |
set -e pipefail | |
for file in *.CR2; | |
do | |
exiftool "$file" | grep -P "AEB Bracket Value\s+: 0" | true | |
if [ "${PIPESTATUS[1]}" -ne 1 ]; then |