Skip to content

Instantly share code, notes, and snippets.

View phwelo's full-sized avatar
🌈

Daniel Agans phwelo

🌈
View GitHub Profile
set-itemproperty -path "HKCU:Control Panel\Desktop" -name WallPaper -value accipiter.png
@phwelo
phwelo / callcenter.ahk
Last active February 23, 2018 03:01
Some version of script I used to kick ass at a callcenter long ago #autohotkey #macros #ahk
;Create Menu
Menu, MyMenu, Add, Attempt 1, attempt1
Menu, MyMenu, Add, Attempt 2, attempt2
Menu, MyMenu, Add, Attempt 3, attempt3
Menu, MyMenu, Add ; Add a separator line.
Menu, Mymenu, Add, Already Resolved, resolved
Menu, Mymenu, Add, Assigned Attempt, assigned
Menu, MyMenu, Add, CMD, PSEXEC
; Create Submenu Items
Menu, Submenu1, Add, Emailer 1, email1
@phwelo
phwelo / gist:135e99cdead59cd3a329
Last active February 6, 2018 02:09
[Check SPF Records] Check SPF records of a domain #SPF #DNS #BAT #CMD
REM Checking outlook 365's SPF records from Google's public DNS at 8.8.8.8
nslookup -query=all -type=TXT spf.protection.outlook.com 8.8.8.8
@phwelo
phwelo / gist:854edf7892928de394d1
Last active February 6, 2018 02:01
[Start CMD as NTUSER/System] One-liner to start command prompt as system user in windows #Powershell #CMD #PSEXEC
psexec –I –d –s cmd
@phwelo
phwelo / keybase.md
Last active February 6, 2018 02:01
[Keybase ID]

Keybase proof

I hereby claim:

  • I am phwelo on github.
  • I am dagans (https://keybase.io/dagans) on keybase.
  • I have a public key whose fingerprint is AA7E 6DF4 0B4D 5421 AA5E 4241 FF26 008E 44E0 4005

To claim this, I am signing this object:

@phwelo
phwelo / itunes-podcast-categories.yml
Last active February 5, 2018 20:16 — forked from codeincontext/itunes-podcast-categories.yml
[iTunes Podcast Categories List] itunes-podcast-categories.yml #YML #iTunes
- Arts:
- Design
- Fashion & Beauty
- Food
- Literature
- Performing Arts
- Spoken Word
- Visual Arts
- Business:
- Business News
@phwelo
phwelo / pushover.rb
Last active February 5, 2018 19:16 — forked from milligramme/pushover.rb
[Pushover for Ruby] Pushover script for sending message to pushover from Ruby #Ruby #Pushover
require "net/https"
url = URI.parse("https://api.pushover.net/1/messages")
req = Net::HTTP::Post.new(url.path)
req.set_form_data({
:token => "abc123",
:user => "user123",
:message => "hello world",
})
res = Net::HTTP.new(url.host, url.port)
@phwelo
phwelo / gist:d8c067d91aea6c8813a3
Last active February 5, 2018 19:15
[Powershell WMI Converter thing] Powershell function to prefix 0's to make a deviceID from powershell WMI output #Powershell #WMI
#Example: Output-FixedLengthString 5 10
#Output will be: 00010
Function Output-FixedLengthString{
param( [int]$EndLength, [string]$StrSubject )
do { $StrSubject = "0$StrSubject"
$length = $StrSubject.length
} until ($length -eq $EndLength)
return $StrSubject
}
@phwelo
phwelo / FirstAvailDriveLetter
Created April 13, 2016 20:05
Ruby function to find first available single-letter drive letter on a windows system
def findADriveLetter()
reverseAlphabet = ["Z", "Y", "X", "W", "V", "U", "T", "S", "R", "Q", "P", "O", "N", "M", "L", "K", "J", "I", "H", "G", "F", "E", "D", "C", "B", "A"]
reverseAlphabet.each { |letter|
if File.exist?("#{letter}:\\")
return letter
break
end
}
end
@phwelo
phwelo / Windows Service
Created April 14, 2016 16:51
return windows service status in plaintext
def search_services(searchString)
psRepoCheck = "(Get-Service -name \"*" + searchString + "*\"|ConvertTo-Json)"
repoCheck = powershell_out!(psRepoCheck).stdout
if repoCheck && repoCheck.length >= 2
svc_hash = JSON.parse(repoCheck)
svc_hash.each do |service|
if service['DisplayName'].include? searchString
case service['Status']
when 1
service[:statusString] = "Stopped"