Under Terminal > Preferences... > (Profile) > Advanced, "Declare terminal as:" should be set to xterm-256color
.
This is easy with homebrew:
brew install screen
import asyncio | |
import functools | |
import signal | |
async def my_task(task_num): | |
try: | |
while True: | |
print(f'Task {task_num}') | |
await asyncio.sleep(task_num + 1) |
Under Terminal > Preferences... > (Profile) > Advanced, "Declare terminal as:" should be set to xterm-256color
.
This is easy with homebrew:
brew install screen
# Your init script | |
# | |
# Atom will evaluate this file each time a new window is opened. It is run | |
# after packages are loaded/activated and after the previous editor state | |
# has been restored. | |
# | |
# An example hack to log to the console when each text editor is saved. | |
# | |
# atom.workspace.observeTextEditors (editor) -> | |
# editor.onDidSave -> |
As configured in my dotfiles.
start new:
tmux
start new with session name:
# Problem: | |
# | |
# If you use git submodules linking two private github repos, you'll need to create a separate deploy key for each. | |
# Multiple keys are not supported by Ansible, nor does ansible (when running git module) resort to your `.ssh/config` file. | |
# This means your ansible playbook will hang in this case. | |
# | |
# You can however use the ansible git module to checkout your repo in multiple steps, like this: | |
# | |
- hosts: webserver | |
vars: |
#!/bin/sh | |
# Just copy and paste the lines below (all at once, it won't work line by line!) | |
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY! | |
function abort { | |
echo "$1" | |
exit 1 | |
} | |
set -e |
<VirtualHost 109.74.199.47:80> | |
ServerAdmin davy.brion@thatextramile.be | |
ServerName thatextramile.be | |
ServerAlias www.thatextramile.be | |
ProxyRequests off | |
<Proxy *> | |
Order deny,allow | |
Allow from all |
#!/bin/sh | |
db2 "connect to sugarult" | |
# Not sure if the following is actually need if the database needs to be restarted | |
# because of the 'currently in use' issues. However it should disconnect all application | |
# connected to the database. | |
db2 "quiesce database immediate force connections" | |
db2 "unquiesce database" |
# Run me with: | |
# | |
# $ nginx -p /path/to/this/file/ -c nginx.conf | |
# | |
# All requests are then routed to authenticated user's index, so | |
# | |
# GET http://user:password@localhost:8080/_search?q=* | |
# | |
# is rewritten to: | |
# |