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
<pre id="changelist7330916824228127372" style="display: none">The only change in version 3.2.9 vs 3.2.8 is that | |
it was built with libssh2 1.8.2 because of a | |
security vulnerability. iTerm2 version 3.2.8 was | |
built with libssh2 1.8.0. | |
More information on the vulnerability in libssh2 | |
may be found here: | |
https://nvd.nist.gov/vuln/detail/CVE-2019-3855 |
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 | |
import asyncio | |
import iterm2 | |
async def main(connection): | |
async def update(theme): | |
# Themes have space-delimited attributes, one of which will be light or dark. | |
parts = theme.split(" ") | |
if "dark" in parts: |
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 re | |
async def main(connection): | |
app = await iterm2.async_get_app(connection) | |
# This regex splits the font into its name and size. Fonts always end with | |
# their size in points, preceded by a space. | |
r = re.compile(r'^(.* )(\d*)$') | |
@iterm2.RPC | |
async def increase_font_size(session_id): |
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.7 | |
import iterm2 | |
async def main(connection): | |
app = await iterm2.async_get_app(connection) | |
def get_all_tab_ids(): | |
result = [] | |
for window in app.terminal_windows: | |
for tab in window.tabs: |
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
[libssh2] 1.110621 Conn: Connection Established - ID: 0/0 win: 0/2097152 pack: 140630114205696/4295000064 | |
[libssh2] 1.110646 Conn: starting request(exec) on channel 0/0, message=scp -f '~/test.txt' | |
=> libssh2_transport_write plain (18 bytes) | |
0000: 62 00 00 00 00 00 00 00 04 65 78 65 63 01 00 00 : b........exec... | |
0010: 00 14 : .. | |
=> libssh2_transport_write plain2 (20 bytes) | |
0000: 73 63 70 20 2D 66 20 27 7E 2F 74 65 73 74 2E 74 : scp -f '~/test.t | |
0010: 78 74 27 00 : xt'. | |
[libssh2] 1.110690 Socket: Sent 80/80 bytes at 0x7fe74da7a260 | |
=> libssh2_transport_write send() (80 bytes) |
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
- (void)drawRect:(NSRect)dirtyRect { | |
NSString *string = @"Hello world"; | |
NSDictionary *attributes = @{ (NSString *)kCTForegroundColorAttributeName: (id)[[NSColor blackColor] CGColor], | |
NSFontAttributeName: [NSFont fontWithName:@"PragmataProMono-Regular" size:12], | |
NSLigatureAttributeName: @0, | |
NSUnderlineStyleAttributeName: @1 }; | |
NSAttributedString *attributedString = [[NSAttributedString alloc] initWithString:string | |
attributes:attributes]; | |
CGColorRef cgColor = (__bridge CGColorRef)attributes[(NSString *)kCTForegroundColorAttributeName]; |
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 | |
import asyncio | |
import iterm2 | |
import sys | |
# This script was created with the "basic" environment which does not support adding dependencies | |
# with pip. | |
async def main(connection, argv): | |
app = await iterm2.async_get_app(connection) |
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
#!/bin/bash | |
#@ Copyright: © 2011 Chris F.A. Johnson | |
#@ Released under the terms of the GNU General Public License V2 | |
#@ See the file COPYING for the full license | |
# Originally from http://cfajohnson.com/shell/listing1.txt | |
# Hacked to be completely different by George Nachman | |
if [ ! -t 1 ] ; then | |
# WARNING * THIS IS A HACK * IT MIGHT BREAK * THERE BE DRAGONS HERE * DO NOT USE IF YOU CARE FOR CORRECTNESS | |
"$0" < /dev/tty > /dev/tty |
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
# bash/zsh completion support for core Git. | |
# | |
# Copyright (C) 2006,2007 Shawn O. Pearce <[email protected]> | |
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/). | |
# Distributed under the GNU General Public License, version 2.0. | |
# | |
# The contained completion routines provide support for completing: | |
# | |
# *) local and remote branch names | |
# *) local and remote tag names |
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
H4sIAPmefFcAA908a3fbtpLf/StQRqmkrKXEdh/b6ri5ju22PieJs7bTx0l8FYqELNYSqfJh2Unz33ce | |
AAjwIdnd3i+b08YxCQwGg3nPgI++eDqJ4qcTP5ttPRIXsygT8B/8KkORxMJbplLeymCIAzwxKXJ8HRRZ | |
niyijzBmmqQiupDpYne4BQBeJ7n8XuQIZpGExVyKVP5ZRKnMxC5CnYmp9PMCf1/NomAm7pJCLACciJNc | |
JPlMpqsok2IiAViRRfEVQpPCOzp+8fYnT+Spv9wWfhzy0zdnp6/eXIwPT1+9Onh95IkbP438yVwOhYhy | |
RGqs8B9HcZb78zlAXUXzuUhuZJpGoUQwsBwCjKaEjHmTxPB/SusQXryrMU4fi0kq/WvasSbZdZysYpEn | |
IiuWyyTNabd7gCvsVMKK8PPJIsny+d0TZ8ju8NnXE8D3JAdgMxg1kRLgyCwH6q6ifEYYhHLqF/NcZDOA | |
leHJvPKD03Pxm9h5NvxKeBfRlUy9bfF2UsR5Ib4e7jwDcN4L2P3HO/HCD53X3wyffQMk9ZdL2NZR6l9L | |
j4lq3u88E95xeHUnjqe5R/vMF8UtjcmCFDH0U0lnpvYiw5GQN/CcDo1wphkzP7hGqlzJXMgs8Jd4sEES | |
AgMs/Qy5LJ+lSXE12xZxUKQZPI9iOLqpRB7RB41vkNGyuAsMGNOzNLqaIc2Wcz+AE8x5zWgh4ei7VejD | |
LTjed++E17k4PnvliS/29T6+/BIenuDT8fnPxy9fjk9eXxz/dHZwcXL6Gv59fnHw8uUxsNa+8DwePIBf |