start new:
tmux
start new with session name:
tmux new -s myname
| tell application "Google Chrome" | |
| set windowList to every tab of every window whose URL starts with "https://mail.google.com" | |
| repeat with tabList in windowList | |
| set tabList to tabList as any | |
| repeat with tabItr in tabList | |
| set tabItr to tabItr as any | |
| delete tabItr | |
| end repeat | |
| end repeat | |
| end tell |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| __author__ = "leo" | |
| __time__ = "2018-01-31" | |
| import os | |
| import requests |
| # -*- mode: conf; -*- | |
| # | |
| # NOTE: Settings generally support python interpolation. This means | |
| # values can contain python format strings which refer to other values | |
| # in the same section, or values in a special DEFAULT section. This | |
| # allows you for example to use common settings for multiple accounts: | |
| # | |
| # [Repository Gmail1] | |
| # trashfolder: %(gmailtrashfolder)s | |
| # |
| #! /usr/bin/env python | |
| # coding: utf-8 | |
| ''' | |
| auto switch keyboard between different applications | |
| if you want to change the app list, modify the var 'ignore_list' | |
| ''' | |
| from AppKit import NSWorkspace, NSWorkspaceDidActivateApplicationNotification, NSWorkspaceApplicationKey |
| #!/usr/bin/env bash | |
| # | |
| # see: https://gist.github.com/gregorynicholas/2160046ec6946a2ce0fa | |
| # src: https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # updated: 2015-06-06 | |
| # | |
| # ask for the administrator password upfront | |
| sudo -v |
| import exifread | |
| # based on https://gist.github.com/erans/983821 | |
| def _get_if_exist(data, key): | |
| if key in data: | |
| return data[key] | |
| return None |
Unless you are using Safari on OSX, most browsers will have some kind of free plugin that you can use to export the browser's history. So that's probably the easiest way. The harder way, which seems to be what Safari wants is a bit more hacky but it will also work for other browsers. Turns out that most of them, including Safari, have their history saved in some kind of sqlite database file somewhere in your home directory.
The OSX Finder cheats a little bit and doesn't show us all the files that actually exist on our drive. It tries to protect us from ourselves by hiding some system and application-specific files. You can work around this by either using the terminal (my preferred method) or by using the Cmd+Shft+G in Finder.
Once you locate the file containing the browser's history, copy it to make a backup just in case we screw up.
| ------------------------------------------------------------------------------------------- | |
| REFERENCES FOR LEARNING & USING APPLESCRIPT Modified: 2016/05/25 15:01 | |
| ------------------------------------------------------------------------------------------- | |
| NOTES | |
| ------------------------------------------------------------------------------------------- | |
| AppleScript is a rather peculiar scripting language to learn. |
rpm --import http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
yum install byacc