Skip to content

Instantly share code, notes, and snippets.

View anthony-o's full-sized avatar

Anthony O. anthony-o

View GitHub Profile
@jsidhu
jsidhu / smtp.sh
Created March 20, 2017 20:43
simple smtp test using bash /dev/tcp without telnet
D=$(date)
timeout 1 bash -c 'cat < /dev/null > /dev/tcp/smtp.mydomain.net/25'
port_25=$?
timeout 1 bash -c 'cat < /dev/null > /dev/tcp/smtp.mydomain.net/587'
port_587=$?
echo "$D Port Check result: port_25:$port_25 git:$port_587"
MAILSERVER=smtp.mydomain.net
PORT=25
@noteed
noteed / docker-ovs.md
Last active December 29, 2023 07:07
Docker - Open vSwitch setup
@risacher
risacher / user.js
Last active December 7, 2016 17:47
tty.js/static/user.js to enable context-menu pasting in Firefox/gecko with tty.js web terminal.
var on = window.Terminal.on;
var isGecko = navigator.userAgent.indexOf('WebKit')==-1 && navigator.product == 'Gecko';
var isChromium = window.chrome;
// replace bindPaste with a variant that:
// 1. doesn't set contentEditable back to 'inherit'
// 2. replaces newlines with carriage returns in the clip
// 3. moves the caret (i.e. the contentEditable cursor) out of sight.
window.Terminal.bindPaste = function(document) {
@TerryMooreII
TerryMooreII / gist:3773579
Created September 24, 2012 00:32
Sending SMTP Commands with /dev/tcp
#!/bin/bash
# Written by: Terry Moore
# Created on Date: 2009-10-12
# Test mail relay from a Linux database server
# Version 0.2
# Last update 2009-10-13
#Body of Email
DATA="The test message has been sent"
@skrb
skrb / Test.java
Created April 8, 2012 02:04
JavaFX WebView Sample
import java.io.IOException;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.StackPane;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.stage.Stage;
public class Test extends Application {
@ajokela
ajokela / gist:1846191
Created February 16, 2012 16:22
Decrypt passwords stored in Oracle SQL Developer.
import javax.crypto.*;
import javax.crypto.spec.*;
import java.security.*;
/**
* Decrypt passwords stored in Oracle SQL Developer.
* This is intended for password recovery.
*
* Passwords are stored in ~/.sqldeveloper/system2.1.1.64.39/o.jdeveloper.db.connection.11.1.1.2.36.55.30/connections.xml
*/
@andyfowler
andyfowler / lessjs.rb
Created October 23, 2010 21:46
Jekyll plugin to render less.js - fixed for new versions of jekyll
module Jekyll
class LessCssFile < StaticFile
def write(dest)
# do nothing
end
end
# Expects a lessc: key in your _config.yml file with the path to a local less.js/bin/lessc
# Less.js will require node.js to be installed