Skip to content

Instantly share code, notes, and snippets.

View dezren39's full-sized avatar
🕵️‍♂️
Processing..

Drewry Pope dezren39

🕵️‍♂️
Processing..
View GitHub Profile
@gsherman
gsherman / test.sql.ps1
Created May 15, 2012 14:10
a simple powershell script for calling an oracle stored procedure with both input and output parameters
$asm = [System.Reflection.Assembly]::LoadWithPartialName("System.Data.OracleClient")
$connectionString = "Data Source=myDatabase;uid=sa;pwd=sa";
$inputString = "foo";
$oracleConnection = new-object System.Data.OracleClient.OracleConnection($connectionString);
$cmd = new-object System.Data.OracleClient.OracleCommand;
$cmd.Connection = $oracleConnection;
$cmd.CommandText = "isFoo";

aws-cli bash helper functions

The official AWS command line tools, have support for configuration profiles. See Configuring the AWS Command Line Interface - Named Profiles.

Managing multiple profiles with the AWS CLI itself is relatively straight forward, switching between them with --profile flag on the command line or the AWS_PROFILE environment variable.

These helpers extend that functionality for convenience with other tools in the ecosystem.

aws-profile

@alexellis
alexellis / INSTRUCTIONS.md
Last active June 21, 2018 15:16
A daemonset for the blinkt
  • Turn off RPis and install Blinkt if you haven't already. Rounded edges should point outwards.
  • Power back up
  • Install Kubernetes (hopefully you've already done this)
  • Download the gist to a temporary file i.e. gist.yml
  • kubectl apply -f gist.yml

Let me know what happens. If you see a red animation going backwards and forwards then everything's working right.

#!/usr/bin/env python
# Original from https://developer.atlassian.com/jiradev/jira-apis/jira-rest-apis/jira-rest-api-tutorials/jira-rest-api-version-2-tutorial
# Original Download link: https://developer.atlassian.com/jiradev/files/8946379/draw-chart.py
# changes by 5nafu
def die(message):
print(message)
import sys
sys.exit(1)
import optparse
@jovabe
jovabe / logger.rifl
Last active March 19, 2020 00:30
Pervasive Data Integrator RIFL Scripts
'*** PUBLIC VARIABLES ***
Public logger as DJRowSet
'*** Add log message to reusable rowset and output to pervasive log ***
Public Function logmsg(msg)
IF logger Is Nothing THEN
Set logger = New DJRowSet
END IF
logger.append(msg)
@dezren39
dezren39 / 01-directory-structure.md
Created July 20, 2020 16:37 — forked from tracker1/01-directory-structure.md
Anatomy of a JavaScript/Node project.

Directory structure for JavaScript/Node Projects

While the following structure is not an absolute requirement or enforced by the tools, it is a recommendation based on what the JavaScript and in particular Node community at large have been following by convention.

Beyond a suggested structure, no tooling recommendations, or sub-module structure is outlined here.

Directories

  • lib/ is intended for code that can run as-is
  • src/ is intended for code that needs to be manipulated before it can be used
@StevenACoffman
StevenACoffman / git_jira_github_pull_request.sh
Last active August 20, 2021 04:11
Create Github pull request from JIRA and git
#!/bin/bash
function safe_curl() {
# call this with a url argument, e.g.
# safecurl.sh "http://eureka.test.cirrostratus.org:8080/eureka/v2/apps/"
# separating the (verbose) curl options into an array for readability
hash curl 2>/dev/null || { echo >&2 "I require curl but it's not installed. Aborting."; exit 1; }
hash jq 2>/dev/null || { echo >&2 "I require jq but it's not installed. Aborting."; exit 1; }
hash sed 2>/dev/null || { echo >&2 "I require sed but it's not installed. Aborting."; exit 1; }
/* So how does this work?
I'm using ANSI escape sequences to control the behavior of the terminal while
cat is outputting the text. I deliberately place these control sequences inside
comments so the C++ compiler doesn't try to treat them as code.*/
//
/*The commands in the fake code comment move the cursor to the left edge and
clear out the line, allowing the fake code to take the place of the real code.
And this explanation uses similar commands to wipe itself out too. */
//
#include <cstdio>
@aheld
aheld / get_rds_tags
Created June 30, 2016 18:44
get RDS tags using AWS cli , this really seems too complicated
#!/bin/bash
REGION="us-east-1"
PROFILE="prod"
get_account_id(){
aws ec2 describe-security-groups \
--group-names 'Default' \
--query 'SecurityGroups[0].OwnerId' \
--output text \
@fsteffek
fsteffek / hb_all_books_dl.js
Last active April 24, 2022 20:47 — forked from graymouser/hb_all_books_dl.js
Humble bundle book bundles - download all books and md5sums
/*
After purchasing a humble book bundle, go to your download page for that bundle.
Open a console window for the page and paste in the below javascript
*/
function getTitle() {
var re = /^Humble\ Book\ Bundle\:\ (.*)\ \(/g;
return re.exec(document.title)[1];
}