Launches an Instapaper Text view of the current page.
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
{ | |
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", | |
"blocks": [ | |
{ | |
"alignment": "left", | |
"segments": [ | |
{ | |
"background": "#d0d5db", | |
"foreground": "#2d3243", | |
"leading_diamond": "\ue0b6", |
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
@echo off | |
rem Jordan Brough 11/04/2014 6:14:19 AM | |
rem use fsutil to create a sequence of test files at specificed sizes (in bytes) | |
rem switch %% to % when running single lines from the CMD prompt | |
rem create 100 1MB files (total 100MB) | |
for /L %%i in (1,1,100) do fsutil file createnew 1MB-%%i.tmp 1048576 | |
rem create 100 10MB files (total ~ 1GB) | |
for /L %%i in (1,1,100) do fsutil file createnew 10MB-%%i.tmp 10485760 |
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 | |
filename=~/path/to/shortened_input.txt | |
exec 4<$filename | |
while read -u4 p ; do | |
expanded=$(curl -sI $p | sed -n 's/Location: *//p') | |
if [ ${#expanded} > 0 ] | |
then | |
echo $expanded >> ~/path/to/expanded_output.txt; | |
else |
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
@echo off | |
rem set general variables | |
set input_files=*.txt | |
rem set date/time variables (generates yyyy-mm-dd_hhmmss) | |
for /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set file_date=%%c-%%a-%%b) | |
for /f "tokens=1-3 delims=:." %%a in ("%TIME%") do (set file_time=%%a%%b%%c) | |
set date_time=%file_date%_%file_time% |
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
# de-munge email address | |
# | |
# accepts a munged email address in one of the following formats (in this case piped from the OS X clipboard) | |
# 1) something at domain dot com | |
# or | |
# 2) something at domain (dot) com | |
# all spaces will be removed | |
# | |
echo `pbpaste` | sed -e 's/ at /@/' -e 's/ dot /./' -e 's/ (dot) /./' -e 's/ //g' |
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 fileContents to read theFile | |
set theURLs to every paragraph of fileContents | |
tell application "Safari" | |
repeat with theURL in theURLs | |
if length of theURL is greater than 0 then | |
add reading list item theURL | |
delay 1 | |
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
@echo off | |
For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set file_date=%%c-%%a-%%b) | |
For /f "tokens=1-3 delims=:." %%a in ("%TIME%") do (set file_time=%%a%%b%%c) | |
echo %file_date%_%file_time% |
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
getAppName() | |
on getAppName() | |
tell application "Finder" | |
try | |
try | |
set appName to name of application file id "com.smileonmymac.PDFpenPro" | |
on error | |
try | |
set appName to name of application file id "com.smileonmymac.PDFpen" | |
on error |
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
-- | |
-- This script launches the current Safari page in Chrome (I use this for sites that require Flash). | |
-- It doesn't do anything to your clipboard, or use keyboard shortcuts (though it could be associated | |
-- with one using Keyboard Maestro or alike). It simply uses Safari's existing open in Chrome | |
-- functionality. It does require that the Develop menu has been enabled in Safari. | |
-- | |
-- grab the current Google Chrome version number from the app bundle | |
tell application "System Events" | |
set version_str to (value of property list item "KSVersion" of contents of property list file "/Applications/Google Chrome.app/Contents/Info.plist") | |
end tell |
NewerOlder