Skip to content

Instantly share code, notes, and snippets.

View back2debug's full-sized avatar

Tracey M back2debug

  • New York
View GitHub Profile
/*
App: Spotify
Problem statement:
After a user searches for a song, how often is any song clicked on
from among the search results?
System nouns:
* Catalog (contains Songs)

need to get back to original branch or clean up accident

  • git checkout -f force overwrite of current changes | dumps any changes like if you accidently delete something

empty commit you can use it to get the ci to run

git commit --allow-empty -m "run-ci"

cherry picking

  • git checkout master
  • git pull
@back2debug
back2debug / readme.md
Last active August 9, 2019 14:35 — forked from benstr/readme.md
Gist Markdown Cheatsheet

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

Paragraph

If the customer wants to upload files through SFTP company servers

  1. Ask the client for SSH public key. If needed, convert the key to Openssh format with the following command: ssh-keygen -i -f ssh2_key.pub
  2. Check if the folder has been created on the dedicated storage - the folder could have already been created if the client has connected once
  3. Create the access with the following command: xxxxxxx-create-sftp <foldername> "<ssh_key>" xxxxxxx-create-sftp foldername "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABA[...]"
  4. Send the following information to the client:
    • URL: foldername.upload.xxxxxx.com
    • Port: 22
    • Login: foldername
    • ssh key as connecting key/password
@back2debug
back2debug / morse-to-text.py
Last active November 5, 2023 12:48
2023 Flag contest Morse to text
# FOUND THIS THREAD ON STACKOVERFLOW FROM 2017! OH JOY!
# https://stackoverflow.com/questions/43012715/morse-audio-decoding-using-python
# There is a script in an archive circa 2011!!! EVEN BETTER!!!
# Downloaded the [archive](https://code.google.com/archive/p/morse-to-text/source/default/source)
# Updated for python3 by following the comments in stackoverflow article BUT.....
# Install missing packages BUT.....
# Forget to update the path in the script to python3 so I lazily changed from python to python3
# Still didn't work because the actual path was......different => run which python!
# Of course works perfectly for their sample files! BUT.... for our file the script did not recognize the long pulse
# Trial and error on changing the band value in the script
  • git pull
  • make sure node is 20.11.1
  • bun install
  • export statement
  • bun build command
  • run the dev client

Build error tips

package main
import (
"bufio"
"fmt"
"os"
"path/filepath"
"regexp"
"strings"
)
5xx errors
Probably a timeout
Can you see evidence of a request in the logs (web layer) or do you see evidence of a hole where they seem to have missed a call if they send multiple calls
Could be they made ran into an error on their end and never made it our servers at all
Do they have retries set up
Does the payload meet size requirements
A gateway timeout could be something ephemeral like unlucky timing with one of our deployments or something
//THIS IS MINE TM
var columnNames = Object.keys(data[0]);//get the column names into an array
for (var name in columnNames){
datagrid.addColumn(columnNames[name],datagrid.DATA_TYPE_STRING);//addColumn header name for grid
}
//TAG VALUE and AOI ARE ARRAYS & CANNOT ADD ARRAY TO CELL
//SO IF [] then space and .join otherwise
for (var response in data){ //for each response
var feedback_details = Object.values(data[response]); //store in an array
for (var detail in feedback_details){ //go through each response