This file contains hidden or 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/env python3 | |
''' | |
Pretty Command Line Interface Example v1.1 | |
@author: Alexander VanTol | |
''' | |
import sys | |
import traceback | |
import argparse | |
from colorama import init, Fore, Back, Style |
This file contains hidden or 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/env python3 | |
''' | |
Created on Apr 20, 2016 | |
@author: alex.vantol | |
BACKUP SCRIPT - w/ CLI | |
Takes a folder and location as input. | |
Outputs a zip file at given location | |
containing the contents of the input folder. |
This file contains hidden or 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
; Quick Text Formatting/Style Changes and Other Helpful Windows Tools | |
; - High-compatibility and unifies keyboard shortcuts b/t programs | |
; - Shortcuts for converting selected text to the following: | |
; All lower: THIS_is-a_tESt -> this_is-a_test | |
; All Upper: THIS_is-a_tESt -> THIS_IS-A_TEST | |
; Caps case: ThisIsAnExample -> THIS_IS_AN_EXAMPLE | |
; thisIsAnExample -> THIS_IS_AN_EXAMPLE | |
; Camel Case: THIS_IS_AN_EXAMPLE -> ThisIsAnExample | |
; this_is_an_example -> ThisIsAnExample | |
; tHIS_Is_an_ExAmPLE -> ThisIsAnExample. |
This file contains hidden or 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
- Right-click shortcut -> Properties -> Shortcut tab -> Target: | |
%windir%\system32\cmd.exe /c start "" "%CD%\this\is\relative\to\shorcut\location" | |
- Make sure "Start in:" is empty | |
- You can use "Change Icon..." too | |
- Look for icons in file: %SystemRoot%\system32\SHELL32.dll |
This file contains hidden or 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
NOTE: Only use on friends. | |
Must have email invite for meeting selected, then run this VBA script | |
as an Outlook Macro (Need Developer pane showing to create/use macro). | |
----------------------------------------------------------------------- | |
Function GetCurrentItem() As Object | |
Dim objApp As Outlook.Application | |
Set objApp = Application | |
On Error Resume Next |
This file contains hidden or 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
Purpose | |
-------------------------------------------------------------------------------------------- | |
Change Windows default name for copied files. Is usually OriginalFileName - Copy.ext | |
Directions | |
------------------------------------------------------------------------------------------- | |
In Windows registry: HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer | |
- Add key : NamingTemplates | |
- Add new String Value : CopyNameTemplate | |
- Add Data for CopyNameTemplate: <New default here> |
This file contains hidden or 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
# Redirect print output to null device on operating system | |
print_redirect = open(os.devnull, 'w') | |
sys.stdout = print_redirect | |
# See this: http://stackoverflow.com/a/6735958/4175042 |
This file contains hidden or 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
import argparse | |
import sys | |
import os | |
def main(): | |
''' | |
Entry point of script | |
''' | |
# Parse arguments into script |
This file contains hidden or 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
""" | |
NATURAL LOG LOOKUP TABLE GENERATOR | |
Generates a lookup table for the natural log function given a lower and upper bound | |
Points chosen ensure that linear approximation between the points minimize error | |
within the MAX_PERCENT_ERROR provided. | |
You can adjust the MAX_PERCENT_ERROR, realizing that a smaller error will require | |
more data points. The length of the resulting list should be printed to standard output. |
This file contains hidden or 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
from config import GOOGLE_APPLICATION_CREDENTIALS | |
from config import GOOGLE_APPLICATION_CREDENTIALS_P12 | |
from config import GOOGLE_CLOUD_IDENTITY_ADMIN_EMAIL | |
from googleapiclient.discovery import build | |
from httplib2 import Http | |
from oauth2client.service_account import ServiceAccountCredentials | |
def connection_test(): |
OlderNewer