Skip to content

Instantly share code, notes, and snippets.

View NodeJSmith's full-sized avatar

Jessica Smith NodeJSmith

  • 22:45 (UTC -05:00)
View GitHub Profile
@piense
piense / example.py
Created October 21, 2023 17:57
Azure Devops Push
import base64
import json
import urllib
import requests
org_name = "your org"
project_name = "your project"
repo_name = "test"
PAT = "a_pat"
@ymtricks
ymtricks / results.py
Created August 15, 2023 08:20
Prefect serializer with async dumps/loads
from io import BytesIO
from typing import Literal, Any
import cloudpickle
import pandas as pd
import prefect
from prefect import flow, task
from prefect.context import TaskRunContext, FlowRunContext
from prefect.filesystems import LocalFileSystem, WritableFileSystem
from prefect.results import get_default_result_storage
@matfax
matfax / .zshrc
Created March 6, 2023 13:38
Sudo authentication with Windows 1Password CLI on Ubuntu WSL
# ....
alias sudo="sudo -A"
@robotdad
robotdad / vs_cpp_winget.md
Last active May 29, 2024 17:28
Installing VS C++ workloads with winget

This is a short outline of how to install the C++ workload with Visual Studio or the build tools using winget.

To find VS releases with winget use search. winget search buildtools

The install command will install the VS installer with the core of the selected product installed. That isn't much. So if you use either of these commands to insll VS or the build tools you will need to launch the VS installer afterwards and select the relevant C++ workloads you need.

winget install Microsoft.VisualStudio.2022.BuildTools

winget install Microsoft.VisualStudio.2022.Community
@xesjkeee
xesjkeee / readme.md
Last active April 11, 2024 12:19
Starship show git user email

Custom command for https://starship.rs/

Show git user email Very useful when you're working for several organizations with difference git settings

ZSH CheatSheet

This is a cheat sheet for how to perform various actions to ZSH, which can be tricky to find on the web as the syntax is not intuitive and it is generally not very well-documented.

Strings

Description Syntax
Get the length of a string ${#VARNAME}
Get a single character ${VARNAME[index]}
@dmglab
dmglab / git_bible.md
Last active March 9, 2024 02:59
how to git

Note: this is a summary of different git workflows putting together to a small git bible. references are in between the text


How to Branch

try to keep your hacking out of the master and create feature branches. the [feature-branch workflow][4] is a good median between noobs (i have no idea how to branch) and git veterans (let's do some rocket sience with git branches!). everybody get the idea!

Basic usage examples

@thatalextaylor
thatalextaylor / 1-python-pretty-time-delta.py
Last active November 5, 2023 22:48
Pretty print a time delta in Python in days, hours, minutes and seconds
def pretty_time_delta(seconds):
sign_string = '-' if seconds < 0 else ''
seconds = abs(int(seconds))
days, seconds = divmod(seconds, 86400)
hours, seconds = divmod(seconds, 3600)
minutes, seconds = divmod(seconds, 60)
if days > 0:
return '%s%dd%dh%dm%ds' % (sign_string, days, hours, minutes, seconds)
elif hours > 0:
return '%s%dh%dm%ds' % (sign_string, hours, minutes, seconds)