Skip to content

Instantly share code, notes, and snippets.

View joshghent's full-sized avatar
🤡
🔫

Josh Ghent joshghent

🤡
🔫
View GitHub Profile
@joshghent
joshghent / musicbox
Created October 30, 2019 09:45
MusicBox
.
@joshghent
joshghent / mirror.sh
Created August 21, 2019 08:25
Mirror repos from gitlab to github
#!/bin/bash
repos=(repository1 repository2)
githubName="joshghent"
for repo in "${!repos[@]}"
do
reponame=${repos[repo]}
git clone git@gitlab.com:${githubName}/${reponame}.git
cd ${reponame}
#!/usr/bin/env python3
"""
Run the following
$ python3 empty.py
You need to install boto3 before by running `pip install boto3 --user`
"""
from __future__ import print_function
import argparse

Keybase proof

I hereby claim:

  • I am joshghent on github.
  • I am joshghent (https://keybase.io/joshghent) on keybase.
  • I have a public key whose fingerprint is 0176 A8D5 896D F7FC CEDD 22B2 F8F3 7646 1CCA 4B50

To claim this, I am signing this object:

openapi: 3.0.0
info:
description: "The SMS API is designed for integration partners to be able to send SMS messages and perform other actions related to SMS through the CloudCall platform"
version: "1.0.0"
title: "SMS API"
contact:
email: "integrations@cloudcall.com"
servers:
- url: https://ng-api.{platform}.cloudcall.com/v3/sms
variables:
@joshghent
joshghent / hi.md
Last active March 19, 2019 13:01
Hi

◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️◻️:white_medium_sq

import { Client } from "node-statsd-client";
import { IGraphiteController } from "../interfaces";
const PREFIX = "MY-API-NAME";
export default class GraphiteController implements IGraphiteController {
private _client: any;
// the graphite port will always be this for every environment
private _port: number = 8125;
private static _instance: GraphiteController;
import { Router } from "express";
import { Config } from "./configuration";
// Import or require the graphite controller and activity labels
import { GraphiteController, GraphiteLabel } from "../graphite";
const router = Router() as Router;
// Load your config
const config = Config.getConfig();
@joshghent
joshghent / graphite.ts
Last active March 5, 2019 17:59
Grafana
import { Client } from "node-statsd-client";
import { IGraphiteController } from "../interfaces";
const PREFIX = "MY-API-NAME";
export default class GraphiteController implements IGraphiteController {
private _client: any;
// the graphite port will always be this for every environment
private _port: number = 8125;
private static _instance: GraphiteController;
@joshghent
joshghent / main.php
Created February 12, 2019 21:46
AgedFirsthandKeyboard created by joshghent - https://repl.it/@joshghent/AgedFirsthandKeyboard
$string = "floccinaucinihilipilification";
// First split the string to an array and then get the unique characters so we don't double count
$characters = array_unique(str_split($string));
$count = [];
// Iterate through the characters list and create an associative array of the characters and their count
foreach($characters as $char) {
$count[$char] = substr_count($string, $char);