Skip to content

Instantly share code, notes, and snippets.

View dpeterka's full-sized avatar

David Peterka dpeterka

View GitHub Profile
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"NotAction": [
"iam:*",
"organizations:*",
"account:*"
],
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"a4b:Get*",
"a4b:List*",
"a4b:Search*",
"access-analyzer:GetAccessPreview",
$hashstore = "C:\VMWare\Guests\ThirdWaveRx\Intune\hash-1.csv"
Import-CSV -Path $hashstore | ForEach-Object {
$fname = (Get-Item $_.Path).Name
$hash = $_.Hash
$dstpath = "C:\VMWare\Guests\ThirdWaveRx\thirdwaverx_vmware\" + $fname
$dsthash = (Get-FileHash -Algorithm "SHA256" $dstPath).Hash
if ($dsthash -ne $hash) {
Write-Output "Failed"
Exit 1
}
@dpeterka
dpeterka / dfsadf
Last active May 25, 2022 21:11
asdf
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="oobeSystem">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="wow64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<OOBE>
<HideEULAPage>true</HideEULAPage>
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
<ProtectYourPC>1</ProtectYourPC>
<HideLocalAccountScreen>true</HideLocalAccountScreen>
<HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
@dpeterka
dpeterka / keybase.md
Created February 7, 2017 18:29
keybase.md

Keybase proof

I hereby claim:

  • I am dpeterka on github.
  • I am evilmonkey (https://keybase.io/evilmonkey) on keybase.
  • I have a public key whose fingerprint is B168 9CB0 0260 8EDC 8E31 1824 AC5A E2C1 E75E DD75

To claim this, I am signing this object:

# Percent of total sytem memory to use
xmx_percent=.7 # Memory to use for supervisord and the OS
worker_mem=1000 # Memory per worker
# Total system memory available
system_memory_in_mb=$(free -m | awk '/Mem:/ {print $2}')
xmx_memory_float=$(echo "$system_memory_in_mb*$xmx_percent"|bc)
xmx_memory=$(echo "($xmx_memory_float+0.5)/1" | bc)
-d /home/dpeterka/reuters/1p-follow/1p-follow-service/build/classes/main -g -encoding UTF-8 -sourcepath /home/dpeterka/reuters/1p-follow/1p-follow-service/build/tmp/compileJava/emptySourcePathRef -classpath /home/dpeterka/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-databind/2.6.3/5c4fcae53dd82e2c549b8322d78c6ff47c94c8a8/jackson-databind-2.6.3.jar:/home/dpeterka/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-annotations/2.6.3/435efa54afd2853995546802280e8cd2d2770d00/jackson-annotations-2.6.3.jar:/home/dpeterka/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.module/jackson-module-afterburner/2.6.3/655d9a2c8be9221abc6ae341f2191de8115114b/jackson-module-afterburner-2.6.3.jar:/home/dpeterka/.gradle/caches/modules-2/files-2.1/com.thomsonreuters/1p-service-lib/0.35.3-SNAPSHOT/dae93cc1b4c8de1456acfa4f7f092ce41ebe33e3/1p-service-lib-0.35.3-SNAPSHOT.jar:/home/dpeterka/.gradle/caches/modules-2/files-2.1/com.thomsonreuters/eiddo-client/0.4.6-SNAPSHOT/ca4d20476d0b
duftler [12:40 AM]12:40
1) ​˜Get the build to the point that we don't need forked repo's and can publish to bintray (from upstream HEAD) artifacts that work with the one-liner 1 and Eric's scripts˜​
2) Create a 'both' choice for the initial (amazon|google|none) prompt
3) Split out defaultRegion into defaultAmazonRegion and defaultGoogleRegion
4) Make one-liner provisioned machine work with Eric's unified configuration setup
5) Get Eric's "start all", "reconfigure" and "stop all" scripts working with new setup
6) Document the simple steps for getting up and running on Amazon and Google using this path
7) ​˜Make sure /home/spinnaker is always created˜​
8) Make apache listen on 9000 instead of 80
##### RAID EXAMPLE
# Check for mounts
disks=($(ls /dev/sd[b-z]))
for dev in "${disks[@]}"
do
disk=$(readlink -f $dev)
grep -q ^$disk /proc/mounts && umount $disk
grep $dev /etc/fstab && sed -i "\,$dev,d" /etc/fstab
done
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from elasticsearch import Elasticsearch
from elasticsearch.exceptions import RequestError
from urlparse import urlparse
from subprocess import Popen, PIPE
import boto3
import sys
import os