This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
USERNAME=email@address | |
PASSWORD=password | |
count=$(curl --url "imaps://imap.gmail.com/INBOX?UNSEEN" --user "$USERNAME:$PASSWORD" --silent | sed s:.*SEARCH\s:: | grep -o ' ' | wc -l | tr -d '[:space:]') | |
if [ "$count" -gt 1 ]; then echo "🚩"; else echo "🏳️"; fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
import os | |
import glob | |
path_string = os.environ['PATH'] | |
paths = path_string.split(":") | |
system_paths = ['/usr/bin','/bin','/usr/sbin','/sbin'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OpenSSH_7.2p2 Ubuntu-4ubuntu2.4, OpenSSL 1.0.2g 1 Mar 2016 | |
debug1: Reading configuration data /home/dansherman/.ssh/config | |
debug1: /home/dansherman/.ssh/config line 1: Applying options for algo | |
debug1: Reading configuration data /etc/ssh/ssh_config | |
debug1: /etc/ssh/ssh_config line 19: Applying options for * | |
debug1: Connecting to #.#.#.# [#.#.#.#] port 22. | |
debug1: Connection established. | |
debug1: key_load_public: No such file or directory | |
debug1: identity file dks.ssh.pem type -1 | |
debug1: key_load_public: No such file or directory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import lxml.html | |
import os | |
import re | |
import sys | |
r = r"(?<=shutterstock_)\d*(?=\.(jpg|eps))" | |
old_file = sys.argv[1] | |
picture_directory = '/Stock Images/' | |
n, file_ext = os.path.splitext(old_file) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set filepath to "~/.volume" | |
set currentVolume to output volume of (get volume settings) | |
if not currentVolume = 0 then | |
set volume output volume 0 | |
do shell script "echo " & currentVolume & " > ~/.volume" | |
else | |
set newVolume to do shell script "tail -n 1 ~/.volume" | |
set volume output volume newVolume | |
end if |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/python | |
import sys | |
from time import sleep | |
import subprocess | |
from subprocess import call | |
import logging | |
import threading | |
import urllib | |
import json | |
from colorsys import hsv_to_rgb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub PrintRedlines() | |
'see if we even need to run | |
If ActiveDocument.Revisions.Count = 0 Then | |
MsgBox "No revisions found." | |
End | |
End If | |
Dim strPages As String | |
Dim currpg As String | |
Dim prevpg As String |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub ChangeCAPStoBold() | |
With Selection.Find | |
.Text = "(<[A-Z.]{2,})" | |
.Replacement.Text = "\1" | |
.Replacement.Font.Bold = True | |
.MatchWildcards = True | |
.Wrap = wdFindContinue | |
.Format = True | |
End With | |
While Selection.Find.Execute |