Skip to content

Instantly share code, notes, and snippets.

View chasinglogic's full-sized avatar

Mathew Robinson chasinglogic

View GitHub Profile
@chasinglogic
chasinglogic / gist:10ccfc765fd32096067fa6e598c3dd40
Created March 29, 2022 08:39
google_sql_user_issue_1_debug_log
2022-03-29T09:24:50.213+0100 [INFO] Terraform version: 1.1.6
2022-03-29T09:24:50.213+0100 [INFO] Go runtime version: go1.17.6
2022-03-29T09:24:50.213+0100 [INFO] CLI args: []string{"terraform", "apply"}
2022-03-29T09:24:50.213+0100 [DEBUG] Attempting to open CLI config file: /Users/chasinglogic/.terraformrc
2022-03-29T09:24:50.213+0100 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2022-03-29T09:24:50.214+0100 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
2022-03-29T09:24:50.214+0100 [DEBUG] ignoring non-existing provider search directory /Users/chasinglogic/.terraform.d/plugins
2022-03-29T09:24:50.214+0100 [DEBUG] ignoring non-existing provider search directory /Users/chasinglogic/Library/Application Support/io.terraform/plugins
2022-03-29T09:24:50.214+0100 [DEBUG] ignoring non-existing provider search directory /Library/Application Support/io.terraform/plugins
2022-03-29T09:24:50.214+0100 [INFO] CLI command args: []string{"apply"}
@chasinglogic
chasinglogic / ex.py
Created September 16, 2019 15:18
justin ex
# SQL
some_obj = MyClass()
query = "SELECT * FROM my_table WHERE id = ?"
result = mydriver.query(query, some_obj.id)
# A BUNCH OF CODE TO SERIALIZE THE RESULT ROWS INTO AN OBJECT, or use of an ORM
# MongoDB
some_obj = MyClass()
import matplotlib
import matplotlib.pyplot
import scipy
import scipy.signal
from numpy import pi
[b,a] = scipy.signal.butter(2,1,analog=1)
zp = scipy.signal.freqz(b, a)
fn get_project_files<'a>() -> Vec<&'a str> {
let ls_files_output = Command::new("git")
.arg("ls-files")
.output()
.expect("Failed to run git ls-files. Make sure you're in a git repo.");
String::from_utf8(ls_files_output.stdout)
.unwrap()
.split("\n")
.collect()
@chasinglogic
chasinglogic / stuart.md
Created December 3, 2017 00:22
Stuart's Ops Journey

PREAMBLE

A couple of things, don't be afraid or feel ashamed to google this. Googling is exteremly encouraged. But I recommend not copy and pasting answers but if you do be sure that you COMPLETELY understand and can remember what you copy and paste.

Any script you write should be committed to Github using git. If you need a git tutorial I recommend: https://try.github.io/levels/1/challenges/1 for the random bash scripts I would recommend starting a "scripts" or "utilities" repo. Every

@chasinglogic
chasinglogic / simplerestapi.md
Created October 18, 2017 19:02
Build Simple REST API in Go.md

Build a simple REST API in Go

The Problem

You are going to build a simple REST API without a Database backend to serve some info about Movies.

The Code

@chasinglogic
chasinglogic / keybase.md
Created October 11, 2017 15:33
keybase proof

Keybase proof

I hereby claim:

  • I am chasinglogic on github.
  • I am chasinglogic (https://keybase.io/chasinglogic) on keybase.
  • I have a public key ASDhkDXmfEb6IDdq_L2DoUotICx-IKhhye5NfH5blMYGHwo

To claim this, I am signing this object:

pub fn gen_module(mut name: String, private: bool) {
let mut working_dir = env::current_dir().expect("Unexpected Error: Cannot get current working directory.");
// This makes sure that the name ends with .rs if not a directory
if is_file(&name) { name.push_str(".rs") }
for dir in name.split("/") {
if is_file(&dir) {
working_dir.push(name);
gen_file_module(working_dir.clone());