Skip to content

Instantly share code, notes, and snippets.

View siennathesane's full-sized avatar
😃
tickle the code, make it laugh

Sienna siennathesane

😃
tickle the code, make it laugh
View GitHub Profile
use timeseriesdb
declare @now datetime2 = sysutcdatetime()
select avg(count) from (select count(*) from (select COLUMN_NAME
from (select *
from INFORMATION_SCHEMA.COLUMNS
where TABLE_SCHEMA = 'default' and TABLE_NAME = 'timeseriestable'
)
where COLUMN_NAME = '%pattern')
resources:
- name: release
type: github-release
source:
owner: 18f
repository: cf-service-connect
access_token: ((github-token))
- name: release-source
type: git
icon: github-circle
@siennathesane
siennathesane / uaa.sh
Created July 22, 2019 17:13
Get the UAA admin token from cf-deployment
$ uaac token client get admin -s $(bosh -d cf manifest | bosh int --path /instance_groups/name=uaa/jobs/name=uaa/properties/uaa/admin/client_secret -)
diff --git cloud.gov/.final_builds/jobs/archiver_syslog/index.yml cloudfoundry-community/.final_builds/jobs/archiver_syslog/index.yml
index 0ddcdd7..1de12aa 100644
--- cloud.gov/.final_builds/jobs/archiver_syslog/index.yml
+++ cloudfoundry-community/.final_builds/jobs/archiver_syslog/index.yml
@@ -1,4 +1,12 @@
builds:
+ 024340d8d44f7c2c67a5037ceaec88ab99d7f6848a138419774d243e01480f90:
+ version: 024340d8d44f7c2c67a5037ceaec88ab99d7f6848a138419774d243e01480f90
+ blobstore_id: c1726afc-09a5-4df7-715a-f0aae6130f11
+ sha1: sha256:08f57c00a283e586c642668163206aaf7d4f5741e0f8b49c4e1aa4a4f28ad820
package main
import (
"database/sql"
"fmt"
"os"
"strconv"
"github.com/cloudfoundry-community/go-cfenv"
"github.com/go-sql-driver/mysql"
#addin "nuget:?package=Cake.FileHelpers&version=3.2.0"
var target = Argument<string>("target");
var globalOutputDir = new DirectoryPath("./build");
var taskHelp = new Dictionary<string,string>() {
{
"Project.DevServer", "Compiles the Project Development Server, which can be easily used for quick and dirty local development."
},
var target = Argument("target", "Welcome");
List<string> tasks = new List<string>();
Setup(context => {
foreach(var task in context.TasksToExecute) {
Information("task: {0}", task.Name);
tasks.Append(task.Name);
}
});
@siennathesane
siennathesane / bootstrap.py
Created May 10, 2019 15:49
Bootstrap a new set of packages not included in the Python3 stdlib.
class Bootstrap(object):
"""
Bootstrap a new set of packages not included in the Python3 stdlib.
"""
def __init__(self, **kwargs):
self.__dict__.update(**kwargs)
self._init()
def _init(self):
@siennathesane
siennathesane / stack.py
Created May 9, 2019 17:53
Directory stacks in Python
# directory stack
_directory_stack = []
def pushd(target: str):
"""
Push a new directory to the top of the stack and changes to it.
Arguments:
target {str} -- Where you want to go
@siennathesane
siennathesane / headers.json
Created May 7, 2019 18:33
Registered HTTP headers in JSON format
{
"Accept": [""],
"Accept-Charset": [""],
"Accept-Encoding": [""],
"Accept-Language": [""],
"Accept-Ranges": [""],
"Access-Control-Allow-Credentials": [""],
"Access-Control-Allow-Headers": [""],
"Access-Control-Allow-Methods": [""],
"Access-Control-Allow-Origin": [""],