I hereby claim:
- I am nsabine on github.
- I am nicksabine (https://keybase.io/nicksabine) on keybase.
- I have a public key whose fingerprint is 0731 859F B8E8 C479 964C 4CE3 9BBB BFFE 5A5B 69AF
To claim this, I am signing this object:
| VMs: | |
| - ose3-disconnected-installer | |
| - 1 GB RAM | |
| - 2 vCPU | |
| - 15 GB HD, default partitioning | |
| - "private" virtual network (internal and host only routing) | |
| - static IP | |
| - RHEL 7.1 minimal server | |
| - ose3-disconnected-master | |
| - 8 GB RAM |
| code { | |
| white-space: pre-wrap !important; | |
| /* text-indent: -20px; */ | |
| /* padding-left: 30px; */ | |
| } | |
| .markdown-body { | |
| width: 100% !important; | |
| } |
I hereby claim:
To claim this, I am signing this object:
| #!/bin/bash | |
| # | |
| # add_user.sh: Add user to LDAP | |
| # Author: Nick Sabine | |
| # | |
| # Defaults | |
| LDAP_BASE="dc=ORG,dc=local" | |
| LDAP_ACCOUNTS_DN="ou=people,${LDAP_BASE}" | |
| LDAP_USER_GROUP="cn=user_group,ou=groups,${LDAP_BASE}" |
| #!/bin/bash | |
| declare -a DISKS=($(fdisk -l | grep 'dev' | awk '{if ($3 > 1000) print $2}' | sed s/.$//)) | |
| declare -a INUSE=($(mount | awk '{if ($1 ~ '/dev/') print $1}')) | |
| declare -a UNUSED=(`comm -23 <(echo ${DISKS[@]} | sed 's/ /\n/g' | sort -u) <(echo ${INUSE[@]} | sed 's/ /\n/g'| sort -u)`) | |
| echo "All Disks larger than 1000 GB:" | |
| for i in ${!DISKS[@]} | |
| do | |
| echo "$i=${DISKS[$i]}" |
| $disks = (wmic diskdrive list brief | measure-object -line | select -ExpandProperty Lines)-2 | |
| 1..$disks | ForEach-Object -Begin {$a = $null} -Process { $a += $("select disk "+$_+[char][int](13)+[char][int](10)) ; $a += "online disk noerr "+[char][int](13)+[char][int](10) ; $a += "clean "+[char][int](13)+[char][int](10) ; $a += "attributes disk clear readonly noerr "+[char][int](13)+[char][int](10) ; $a += "convert dynamic noerr "+[char][int](13)+[char][int](10) ;} -End { $a += "exit"+[char][int](13)+[char][int](10) ; $a | Set-Content c:\diskpart1.txt -Encoding ASCII } | |
| $a = "create volume stripe disk=1" | |
| 2..$disks | ForEach-Object -Process {$a += ","+$_} | |
| $a += [char][int](13)+[char][int](10) | |
| $a += "format fs=ntfs label=scratch quick"+[char][int](13)+[char][int](10) | |
| $a += "assign letter=z"+[char][int](13)+[char][int](10) | |
| $a += "exit"+[char][int](13)+[char][int](10) |
| import os | |
| import keyword | |
| import sys | |
| # key phrase to look for | |
| needle = 'todo' | |
| # file extensions to be searched for todo statements | |
| extensions_to_include = ('.py', '.c', '.m', '.h', '.txt') |
| import sqlite3 | |
| db_filename = "test.db" | |
| def create_schema(conn): | |
| schema = """ | |
| drop table if exists word; | |
| create table word ( | |
| id integer primary key autoincrement not null, | |
| w text |
| import random | |
| def random_int(num: int = 1, min: int = 1, max: int = 100) -> [int]: | |
| """Return a list of random integers.""" | |
| ints = [] | |
| for i in xrange(num): | |
| ints.append(random.randint(min,max)) | |
| return ints | |
| def random_word(num: int = 1) -> [str]: |
| #!/usr/bin/env python | |
| from collections import defaultdict | |
| # Initialize dictionary of user ids | |
| uids = defaultdict(list) | |
| # loop through password file, building dictionary of uid:[list of usernames] | |
| with open("/etc/passwd") as passwd_file: | |
| for line in passwd_file: |