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
$ python3 | |
Python 3.5.3 (default, Sep 27 2018, 17:25:39) | |
[GCC 6.3.0 20170516] on linux | |
Type "help", "copyright", "credits" or "license" for more information. | |
# Print a string | |
>>> print("string") | |
string | |
# Try to print a string but forget the parentheses |
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
-- | |
-- Create table for testing | |
-- | |
BEGIN TRANSACTION; | |
CREATE TABLE host_locations( | |
name VARCHAR(30), | |
qualifier VARCHAR(30), | |
value VARCHAR(30) |
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
On your boxes, does this: | |
ps -e -o user,pid,ppid,etime,stime,args | |
work to show the time that the process has been running for (ELAPSED), and when it was started (STIME)? | |
If so, they will be in the format: | |
root 10331 1 31-09:25:11 Apr_08 su -c su oracle -c /u03/app/batch/scripts/import_locatn.sh … |
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
! | |
! For all [xa]term,put this in your | |
! ~/.Xdefaults or ~/.Xresources: | |
! | |
! Defaults for all xterm clients | |
XTerm*background: black | |
XTerm*foreground: gray | |
! XTerm*highlightColor: white | |
! XTerm*highlightTextColor: black |
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
$#N:: | |
;; insert {noformat} tags | |
cb_tmp := SelectedViaClipboard() | |
StringReplace cb_tmp, cb_tmp, `n,, All | |
if ( cb_tmp ) { | |
SendInput {{}noformat{}}`n%cb_tmp%{{}noformat{}}`n | |
} | |
else | |
{ |
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
#!/usr/bin/perl | |
# | |
# | |
# | |
use warnings; | |
use strict; | |
use HTML::TreeBuilder; | |
my $tree = HTML::TreeBuilder->new_from_file(shift); |
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
!j:: | |
WinGet, Active_ID, ID, A | |
WinGet, Active_Process, ProcessName, ahk_id %Active_ID% | |
if ( Active_Process ="OUTLOOK.EXE" ) | |
{ | |
; Match strings anywhere in the window title | |
SetTitleMatchMode, 2 | |
numericPrefix = 1 | |
ctrlXPrefix = 0 |
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
Sub MoveMsgToFolder() | |
'Outlook VB Macro to move currently open mail item to a target folder | |
On Error Resume Next | |
Dim ns As Outlook.NameSpace | |
Dim moveToFolder As Outlook.MAPIFolder | |
Dim myItem As Outlook.MailItem |
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
;; Start SSH session using the currently selected text as the target hostname. | |
$#S:: | |
; Putty copies selected text to the clipboard so you don't need to copy it | |
; doing Ctrl-Insert throws away what you already have in the Clipboard. | |
; Can't use Ctrl-C in putty, because it sends that to your session as ^C | |
WinGet, Active_ID, ID, A | |
WinGet, Active_Process, ProcessName, ahk_id %Active_ID% | |
if ( Active_Process ="putty.exe" ) | |
{ |
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
// ==UserScript== | |
// @name Context SSH Links | |
// @namespace https://gist.github.com/johngh | |
// @version 0.1 | |
// @description Create SSH/RDP URIs in web pages | |
// @match http://www.ourdomain.com/* | |
// @copyright 2012+, John Harrison | |
// ==/UserScript== | |
var my_login = "johngh"; |
NewerOlder