Function | Shortcut |
---|---|
New Tab | ⌘ + T |
Close Tab or Window | ⌘ + W (same as many mac apps) |
Go to Tab | ⌘ + Number Key (ie: ⌘2 is 2nd tab) |
Go to Split Pane by Direction | ⌘ + Option + Arrow Key |
Cycle iTerm Windows | ⌘ + backtick (true of all mac apps and works with desktops/mission control) |
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
import pulumi | |
import pulumi_aws | |
from localstack_endpoints import localstack_endpoints as endpoints | |
aws = pulumi_aws.Provider( | |
'localstack', | |
skip_credentials_validation=True, | |
skip_metadata_api_check=True, | |
s3_force_path_style=True, | |
access_key="mockAccessKey", |
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
def split_numbers(numbers): | |
split_size = int(len(numbers) / 2) | |
list_a = numbers[:split_size] | |
list_b = numbers[split_size:] | |
return list_a, list_b | |
def find_matching_sum(match, numbers): | |
list_a, list_b = split_numbers(numbers) | |
for x in list_a: |
I hereby claim:
- I am iamjohnnym on github.
- I am iamjohnnym (https://keybase.io/iamjohnnym) on keybase.
- I have a public key ASARAMuMe3ReDC4AoogsWggh6CT1qbIdQ8VPvfxyHBcytQo
To claim this, I am signing this object:
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 | |
## ./curl_resume.sh https://example.com | |
export done=1; | |
while [ $done -gt 0 ]; do | |
/usr/bin/curl -O -C - $1; | |
export done=$?; | |
done |
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
- name: install rvm | |
raw: curl -L https://get.rvm.io | bash -s stable | |
tags: | |
- install | |
- name: source scripts | |
raw: . ~/.bashrc | |
tags: | |
- install |
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
I'm looking to point load the passenger library from my local users home directory: | |
/home/rails/.rvm/gems/gems/passenger-4.0.57 | |
In my applications virtualhost, I have this block: | |
<IfModule mod_passenger.c> | |
PassengerRoot /home/rails/.rvm/gems/gems/passenger-4.0.57 | |
PassengerDefaultRuby /home/rails/.rvm/gems/ruby-2.1.0/wrappers/ruby | |
</IfModule> |
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
When trying to execute this, I keep running into rack not found: | |
$ gem install rack | |
Successfully installed rack-1.6.0 | |
1 gem installed | |
$ stat ~/.rvm/gems/gems/rack-1.6.0/ | |
File: ‘/home/rails/.rvm/gems/gems/rack-1.6.0/’ | |
Size: 4096 Blocks: 8 IO Block: 4096 directory | |
Device: 801h/2049d Inode: 659676 Links: 7 |
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
# LAMP Deployment Vars | |
# group_vars/all | |
playbook: { | |
'php5': { | |
'apache': "apache2", | |
'packages': [ | |
"libapache2-mod-php5", | |
"php5-cli", |
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
- name: Setup default firewall rules | |
command: "/sbin/iptables -I INPUT 1 -p tcp -m tcp -m comment --comment '{{item.type}}' --dport {{item.port}} -j ACCEPT" | |
with_items: | |
- {'type':'SSH', 'port':22} | |
- {'type':'HTTP', 'port':80} | |
- {'type':'HTTPS', 'port':443} | |
when: ansible_os_family == 'RedHat' | |
- name: Setup default firewall rules | |
command: ufw allow {{item}} | |
with_items: |