Skip to content

Instantly share code, notes, and snippets.

View robconery's full-sized avatar
😍

Rob Conery robconery

😍
View GitHub Profile
@robconery
robconery / gist:98d4653c7b11633e6e74
Last active September 28, 2023 16:22
Jekyll to Ghost Export
We couldn’t find that file to show.
@robconery
robconery / gist:1636b3797d89f2c9b64f
Last active September 28, 2023 16:23
Baseline PG Connection Bits for Node
We couldn’t find that file to show.
@robconery
robconery / CommandRunner.cs
Created February 22, 2015 12:16
Simple Data Access for Postgres and .NET
using Npgsql;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Massive
@robconery
robconery / gist:a84381b5631cf3b597fa
Last active September 28, 2023 16:23
Simple Node/PG DB Command Runner
We couldn’t find that file to show.
@robconery
robconery / fuego.js
Created April 5, 2017 23:43
A Firebase Wrapper for Node
const admin = require("firebase-admin");
const Promise = require("bluebird");
const cert = require("./cert.json");
const Emitter = require("events").EventEmitter;
const assert = require('assert');
//using this for convenience
const shortid = require("shortid");
shortid.characters('0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_@');
admin.initializeApp({
@robconery
robconery / install_dncore.sh
Last active July 1, 2017 16:19
dot net core installer for Cloud9
#!/usr/bin/env bash
############### USAGE ###############
#
# 1. Create a new workspace on Cloud9 using the "Blank" template
#
# 2. Run this command in the console:
# bash <(curl -fsSL https://gist.githubusercontent.com/robconery/aefb86f25ec794a2268cf38d44238352/raw/898f8997220df38de193d48c07c2fb078aede10a/install_dncore.sh)
echo Updating Packages...
@robconery
robconery / register.sql
Created December 29, 2017 01:49
A PLPGSQL Register Function
CREATE OR REPLACE FUNCTION register(login varchar(50), email varchar(50), password varchar(50), ip inet)
returns TABLE (
new_id bigint,
message varchar(255),
email varchar(255),
email_validation_token varchar(36)
)
AS
$$
DECLARE
@robconery
robconery / azure_webapp_setup.sh
Last active November 23, 2023 08:31
az webapp creation
#!/bin/bash
USER=deployer
PASS=[pick something]
APPNAME=[your app name]
RG=[your resource group]
SP=[your service plan]
#you can see a list of runtimes using
#az webapp list-runtimes --linux
@robconery
robconery / azure_postgres_tryout.sh
Created September 14, 2018 23:30
Spin up an Azure PostgreSQL database
#!/bin/bash
USER=admin_$RANDOM #set this to whatever you like but it's not something that should be easy
PASS=$(uuidgen) #Again - whatever you like but keep it safe! Better to make it random
SERVERNAME=[YOUR SERVER NAME] #this has to be unique across azure
#resource group
RG=[YOUR RESOURCE GROUP] #you can create these if you need to by uncommenting the lines below
@robconery
robconery / azure_postgresql_deploy.sh
Created October 1, 2018 19:32
Deployment script for Azure PostgreSQL
#!/bin/bash
#These are the settings for deployment. The only thing you need to be sure you change is
#the resource group, as that will be the name you will use to destroy things later
USER=admin_$RANDOM #set this to whatever you like but it's not something that should be easy
PASS=$(uuidgen) #Again - whatever you like but keep it safe! Better to make it random
LOCATION=westus
SERVERNAME=northwind-$RANDOM #this has to be unique across azure
#resource group