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
__SRC_PATH__ = "foo/" | |
__SRC_NAME__ = "bar.pptx" | |
def main(): | |
"""The main function""" | |
prs = Presentation(f"{__SRC_PATH__}{__SRC_NAME__}") | |
for sl_idx,slide in enumerate(prs.slides): | |
print(f"--- Slide {sl_idx} --- slide_layouts[{prs.slide_layouts.index(slide.slide_layout)}]: \"{slide.slide_layout.name}\"") | |
print(f"--- Slide {sl_idx} --- Placeholders ---") | |
for ph_idx,ph in enumerate(slide.placeholders): |
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
def type_set(val): | |
""" | |
return the value with its correct type | |
default type of return value is str | |
:val: input value of any type | |
:return: same value, correct type | |
""" | |
try: | |
return int(val) | |
except ValueError: |
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
-- http://www.alfredforum.com/topic/721-executing-iterm2-terminal-commands-in-current-shell/ | |
on alfred_script(q) | |
tell application "iTerm" | |
activate | |
try -- We don't need error messages | |
set miniaturized of windows to false | |
end try | |
try |
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
-- Found at: http://hints.macworld.com/article.php?story=2007102012424539 | |
-- Example list of processes to ignore: {"xGestures"} or {"xGestures", "OtherApp", ...} | |
property processesToIgnore : {"loginwindow", "talagent", "Dock", "SystemUIServer", "SIMBL Agent", "AFSBackgrounder", "NotificationCenter", "iTunesHelper", "PhotoStreamAgent", "com.apple.dock.extra", "WebProcess", "AppleSpell", "com.apple.qtkitserver", "SophosUIServer", "PTPCamera", "Image Capture Extension", "mdworker", "System Events"} | |
-- Get the size of the Display(s), only useful if there is one display | |
-- otherwise it will grab the total size of both displays | |
tell application "Finder" | |
set _b to bounds of window of desktop | |
set screen_width to item 3 of _b |
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 bash | |
echo "*** $0: $(date) @ ${HOSTNAME}" >> ${HOME}/sessionlog.txt | |
xset b 100 400 20 # set bell style volume(%) pitch duration | |
xset c off # keyclick off | |
xset m 35/10 10 # mouse | |
xterm -name ${HOSTNAME} -geometry 90x26+0+0& | |
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 bash | |
echo "*** $0: $(date) @ ${HOSTNAME}" >> ${HOME}/sessionlog.txt | |
xset b 100 400 20 # set bell style volume(%) pitch duration | |
xset c off # keyclick off | |
xset m 35/10 10 # mouse | |
#TODO: check for remote session! | |
xrandr --verbose --query --output VGA1 --auto 2>&1 >> ${HOME}/sessionlog.txt |