- j, s scroll down scrollDown
- k, w scroll up scrollUp
- h scroll left scrollLeft
- l scroll right scrollRight
- d scroll half-page down scrollPageDown
-
scroll full-page down scrollFullPageDown
- u, e scroll half-page up scrollPageUp
- scroll full-page up scrollFullPageUp
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
__version__ = '0.1.0' | |
import subprocess | |
import os | |
import re | |
import sys | |
import json | |
import base64 | |
import ast | |
import getpass | |
from pty import slave_open |
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
# Docker Scripts | |
Scripts that can be executed from a command line |
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
curl -fsSL https://get.docker.com | sh | |
sudo curl -L "https://github.com/docker/compose/releases/download/1.26.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | |
sudo chmod +x /usr/local/bin/docker-compose | |
sudo usermod -aG docker $USER | |
newgrp docker | |
newgrp $USER | |
# Sometimes, when Docker is installed by root, but launched by user in docker group, | |
# Docker fails with a cryptic message about map segment error shared library libz.so.1 | |
# This is due to Docker trying to access root's tmp folder without permission | |
# This teaches Docker where to look for tmp folder |
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
# Dummy file to give the Gist a proper name. | |
# Gist name is given by the first file in alphabetic order. | |
# This ia the reasons our Gists names are all prefixed by a `#` |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>jQuery bug</title> | |
<script src="https://code.jquery.com/jquery-3.0.0.js" defer></script> | |
<script src="https://jsbin.com/bopuva.js" defer></script> | |
<script src="https://jsbin.com/wihisid.js" defer></script> | |
<script src="https://jsbin.com/weyiso.js" defer></script> |
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
window.test = "Fail Init"; | |
// test result when jQuery ready fires | |
$(function() { $('#resultJQ').html("jQuery result: " + window.test);}); | |
// test result when document is ready | |
document.addEventListener("DOMContentLoaded", function() { $('#resultDOM').html("DOM result: " + window.test);}); |
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
This is a test Gist | |
#tag1 | |
#tag2 |
TCL-Expect scripts are an amazingly easy way to script out laborious tasks in the shell when you need to be interactive with the console. Think of them as a "macro" or way to programmaticly step through a process you would run by hand. They are similar to shell scripts but utilize the .tcl
extension and a different #!
call.
The first step, similar to writing a bash script, is to tell the script what it's executing under. For expect
we use the following:
#!/usr/bin/expect
NewerOlder