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 December 4, 2024 12:56
Visual Studio Code Preferences

My Visual Studio Code Preferences

The various settings I use in VS Code. Useful, not only for new setups, but also sharing with others.

These preferences are organized in the order you might configure VS Code from scratch.

  1. Keyboard Shortcuts (keybindings.json)
  2. Settings (settings.json)
  3. Extensions
  4. Workspace config (projects.code-workspace)
@seantrane
seantrane / README.md
Created January 8, 2019 14:29
CI/CD Services & Software Comparison
@seantrane
seantrane / postgres-cheatsheet.md
Created August 27, 2018 20:14 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@seantrane
seantrane / create_labels.sh
Last active August 17, 2018 16:05 — forked from Chompas/create_labels.sh
Bash script to create multiple Github labels at once
#!/usr/bin/env bash
#
# This is a modification from https://gist.github.com/omegahm/28d87a4e1411c030aa89
# Colours and convention picked from https://robinpowered.com/blog/best-practice-system-for-organizing-and-tagging-github-issues/
#
# Instructions
# Bash 4+ is needed because of associative arrays
# jq (https://stedolan.github.io/jq/)
# Create access Token from Github (https://help.github.com/articles/creating-an-access-token-for-command-line-use/) and save it under ".token" file
# Comment / Uncomment / Add, all the labels you want
@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))