brian wickman - @wickman
[TOC]
Pants makes the manipulation and distribution of hermetically sealed Python environments
#!/usr/bin/env bash | |
screenshot="screnshot.png" | |
screencapture='/usr/sbin/screencapture -xC' | |
if [ `whoami` == 'root' ]; then | |
loginpid=`ps -ax | grep [l]oginwindow.app | awk '{print $1}'` | |
launchctl bsexec $loginpid $screencapture $screenshot | |
else | |
$screencapture $screenshot |
param( | |
[string] $rootFolder = ".", | |
[string] $filter = "*.*" | |
) | |
$path = resolve-path $rootFolder -errorAction Stop | |
write-host "Monitoring $path for changes" | |
$fsw = new-object System.IO.FileSystemWatcher $path, $filter | |
$fsw.IncludeSubdirectories = $true |
<# | |
.SYNOPSIS | |
Gets a PowerShell Credential (PSCredential) from the Windows Credential Manager | |
.DESCRIPTION | |
Adapted from: http://stackoverflow.com/questions/7162604/get-cached-credentials-in-powershell-from-windows-7-credential-manager | |
.PARAMETER TargetName | |
The name of the target login informations in the Windows Credential Manager |
function dex-method-count() { | |
cat $1 | head -c 92 | tail -c 4 | hexdump -e '1/4 "%d\n"' | |
} | |
function dex-method-count-by-package() { | |
dir=$(mktemp -d -t dex) | |
baksmali $1 -o $dir | |
for pkg in `find $dir/* -type d`; do | |
smali $pkg -o $pkg/classes.dex | |
count=$(dex-method-count $pkg/classes.dex) | |
name=$(echo ${pkg:(${#dir} + 1)} | tr '/' '.') |
Hi there!
The docker cheat sheet has moved to a Github project under https://github.com/wsargent/docker-cheat-sheet.
Please click on the link above to go to the cheat sheet.
Auth0 is a privately-held tech company based in Seattle, WA. We have a distributed team working remotely from Seattle, Buenos Aires and Cordoba.
We're building the company we always wanted, with people who share the same passion for technology, solutions and customers.
This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.
The script is here:
#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"