Skip to content

Instantly share code, notes, and snippets.

View seantrane's full-sized avatar

Sean Trane Sciarrone seantrane

View GitHub Profile
@seantrane
seantrane / README.md
Last active November 27, 2023 14:56
Shell Commands and Scripting Snippets

Commands

A collection of common shell commands.

@seantrane
seantrane / bash-cli
Last active March 10, 2019 19:51
CLI Starter Kit
#!/usr/bin/env bash
# shellcheck disable=SC2034
# --------------------------------------------------------------------------------------------------
# ==================================================================================================
# ==================================================================================================
# **************************************************************************************************
#
# ,ad8888ba, 88 88
# d8"' `"8b 88 88
# d8' 88 88
@seantrane
seantrane / - Confluence User Macros.md
Last active May 7, 2018 22:08
User Macros for Atlassian Confluence

Confluence User Macros

Here are some User Macros for Atlassian Confluence.

There are two types of markup in Liquid: Output and Tag.

  • Output markup (which may resolve to text) is surrounded by
{{ matched pairs of curly brackets (ie, braces) }}
  • Tag markup (which cannot resolve to text) is surrounded by
@seantrane
seantrane / headers.php
Last active April 21, 2018 13:16
PHP: Headers
/* Time-Scales */
$aTimeScale = array(
'year' => 31536000,
'month' => 2628000,
'week' => 604800,
'day' => 86400,
'hour' => 3600,
'minute' => 60
);
/* Expires */
@seantrane
seantrane / MySQLi.php
Last active April 21, 2018 13:16
PHP: MySQLi (generic usage example)
$mysqli = new mysqli($host,$user,$pass,$db,$port);
if ($mysqli->connect_errno)
{
error_log('Database Connection Error: '.$db.' (URI: '.$_SERVER["REQUEST_URI"].'): #'.$mysqli->connect_errno.' - '.$mysqli->connect_error, 0);
return false;
}
else
{
$aReturn = array();
if ($result = $mysqli->query($sql))
@seantrane
seantrane / structure.html
Last active April 21, 2018 13:17
HTML: Structure
<!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7 ie6" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8 ie7" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9 ie8" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
<link rel="schema.DC" href="http://purl.org/dc/elements/1.1/">
<link rel="schema.DCTERMS" href="http://purl.org/dc/terms/">
<title></title>
<meta name="description" content="">
@seantrane
seantrane / google-websearch.html
Last active April 21, 2018 13:18
HTML: Google WebSearch
<script src="http://www.google.com/jsapi?key=XXXXXXXXXXXXXXX"></script>
<script type="text/javascript">
google.load('search', '1');
function OnLoad() {
var searchControl = new google.search.SearchControl();
var webSearch = new google.search.WebSearch();
var options = new google.search.SearcherOptions();
var drawOptions = new google.search.DrawOptions();
options.setExpandMode(google.search.SearchControl.EXPAND_MODE_OPEN);
drawOptions.setDrawMode(google.search.SearchControl.DRAW_MODE_LINEAR);