Note: Created at 2016/08/07
- Automation refresh by cron
- Let's Encrypt
-- In Safari, this copies the Title and URL of the current tab to the clipboard. | |
-- Save the script in ~/Library/Scripts/Applications/Safari | |
-- Using QuickSilver, I assign a trigger to this script using the hotkey ⌥-C (option c), with the scope of the trigger limited to Safari. | |
-- Inspired by CopyURL + (http://copyurlplus.mozdev.org/) | |
-- Christopher R. Murphy | |
tell application "Safari" | |
set theURL to URL of front document | |
set theTitle to name of front document | |
set the clipboard to theTitle & return & theURL as string |
tell application "Finder" | |
set the appfiles to files in folder (POSIX file "/tmp/somefolder" as text) | |
repeat with appfile in appfiles | |
delete appfile | |
end repeat | |
end tell |
# name: это строка которую транслитим | |
def transliterate(name): | |
""" | |
Автор: LarsKort | |
Дата: 16/07/2011; 1:05 GMT-4; | |
Не претендую на "хорошесть" словарика. В моем случае и такой пойдет, | |
вы всегда сможете добавить свои символы и даже слова. Только | |
это нужно делать в обоих списках, иначе будет ошибка. | |
""" | |
# Слоаврь с заменами |
# This tag loads the rewrite module | |
<IfModule mod_rewrite.c> | |
# enable the rewrite engine | |
RewriteEngine On | |
# Set your root directory | |
RewriteBase / | |
# Remove the .html extension | |
RewriteCond %{THE_REQUEST} ^GET\ (.*)\.html\ HTTP | |
RewriteRule (.*)\.html$ $1 [R=301] |
property defaultAccountName : "iCloud" | |
property defaultFolderName : "Saved Safari Windows" | |
global html | |
global processedURLs | |
on appendLineWithDoc(theDoc) | |
tell application "Safari" | |
tell theDoc | |
try |
#!/bin/bash | |
# Author: Rick Cogley | |
# Updated: 27 Jan 2016 | |
# Purpose: For use in a Mac OS X automator action, set to watch a screenshot folder. | |
# Assumes: | |
# GOPATH is set | |
# drive is installed (https://github.com/odeke-em/drive) | |
# there is a folder initialized with "drive init" | |
DRIVEINITPATH=$HOME/gdrive |
#!/bin/bash | |
# Перекодирует рекурсивно в текущем каталоге имена | |
# файлов и каталогов в транслит. | |
# | |
# Источник: http://www.ubuntu.sumy.ua/2011/03/translit.html | |
shopt -s nullglob | |
for NAME in * ; do | |
TRS=`echo $NAME | sed "y/абвгдезийклмнопрстуфхцы/abvgdezijklmnoprstufxcy/"` | |
TRS=`echo $TRS | sed "y/АБВГДЕЗИЙКЛМНОПРСТУФХЦЫ/ABVGDEZIJKLMNOPRSTUFXCY/"` |
[ | |
// enter command mode in Vintage | |
{ "keys": ["j", "j"], "command": "exit_insert_mode", | |
"context": | |
[ | |
{ "key": "setting.command_mode", "operand": false }, | |
{ "key": "setting.is_widget", "operand": false } | |
] | |
}, |
#!/usr/bin/python | |
import csv | |
import requests | |
csv_data_to_write = [['original url', 'destination url', | |
'final http status', 'redirect path']] | |
def redirect_history(history): | |
'''repack urls to a neat list''' |