Skip to content

Instantly share code, notes, and snippets.

"Written by James Habben (@JamesHabben)"
"Last Updated: 2016-10-18"
""
""
"Start with device not inserted. Remove it now if it is in already."
read-host "press enter to continue"
$devices1 = Get-WmiObject Win32_PNPEntity
" Total devices before: {0}" -f $devices1.count
@lucachr
lucachr / .mailrc
Created January 2, 2015 13:07
Sample .mailrc configuration file for Gmail
set smtp-use-starttls
set smtp=smtp://smtp.gmail.com:587
set smtp-auth=login
# Change 'xxxxxx' with your username
set smtp-auth-user=xxxxxx@gmail.com
# Change 'xxxxxxxxxxxx' with your password
set smtp-auth-password=xxxxxxxxxxxx
# Change 'xxxxxxxx' with the name of your Firefox's profile,
# it is located in the ~/.mozilla/firefox/ directory.
set nss-config-dir=~/.mozilla/firefox/xxxxxxxx.default
@superdaigo
superdaigo / zabbix-alert-smtp.sh
Created September 20, 2012 04:58
Zabbix SMTP Alert script for gmail
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Zabbix SMTP Alert script for gmail.
"""
import sys
import smtplib
from email.MIMEText import MIMEText
from email.Header import Header
@artero
artero / launch_sublime_from_terminal.markdown
Last active May 15, 2024 03:38 — forked from olivierlacan/launch_sublime_from_terminal.markdown
Launch Sublime Text 2 from the Mac OS X Terminal

Launch Sublime Text 2 from the Mac OS X Terminal

Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.

open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl

You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html

Installation