Skip to content

Instantly share code, notes, and snippets.

View awsomesawce's full-sized avatar
🎯
Learning NodeJS and getting certified!

Carl C awsomesawce

🎯
Learning NodeJS and getting certified!
View GitHub Profile

Note 2024-05-11T14.04.28

========================

Microsoft Store - Is it legit?

@awsomesawce
awsomesawce / OpenGitRepoBrowser.psd1
Last active November 18, 2023 02:14
Open a GitHub repository from the commandline using gh and pwsh (or just pwsh)
#
# Module manifest for module 'OpenGitRepoBrowser'
#
# Generated by: Carl Capodice
#
# Generated on: 11/17/2023
#
@{
@awsomesawce
awsomesawce / objectdict.py
Last active December 7, 2021 22:44
Python Object Dict
"""Object Dict from tornado.util
Reduce contained code to it's absolute minimum and import what you need.
"""
from pprint import pprint
from typing import Dict, List, Any, AnyStr, NamedTuple, Tuple, Union, Sequence
import json
import os, sys
__all__ = [
@awsomesawce
awsomesawce / getpsenv.ps1
Last active July 29, 2021 22:58
Nodejs utility functions for Powershell.
#!/usr/bin/env -S pwsh -nop
<#
.Description
Get psenv file from gist
.Version 0.2.1
#>
$gisturl = "https://gist.githubusercontent.com/awsomesawce/f37c910c245ed409fa6da84edf716dd9/raw/e8adc7e69ab23f98afc016a95fad83f10636b737/psenv.ps1"
# Use a higher tls version
@awsomesawce
awsomesawce / redirection_ex.sh
Last active July 6, 2021 00:16
Bash redirection examples
#!/usr/bin/env bash
# Interesting ways of using redirection to get distro info
# Shoutout to neofetch and screenfetch
find_distro () {
# This if statement uses the `< ./filename` redirection instead of cat
if [[ -f /etc/lsb-release && $(< /etc/lsb-release) == *Ubuntu* ]]
then
echo "It is Ubuntu"
return 0
@awsomesawce
awsomesawce / curly_conditionals.zsh
Created June 24, 2021 21:02
Zsh Curly Bracket Conditionals
#!/usr/bin/env -S zsh -f
# Curly-bracket conditional expressions in Zsh.
#
# Tired of the strangeness of the `if condition; then blah; fi` syntax?
# **Zsh** supports using _curly brackets_ to separate your conditional expressions!
# This makes it more similar to every other programming language out there, including
# **Powershell**.
get_first_line() {
if [[ $# -eq 0 ]] {
@awsomesawce
awsomesawce / FileSystemFuncs.bash
Last active June 4, 2021 04:10
List of filesystem-related functions for bash.
#!/bin/bash
# Name: FileSystemFuncs.bash
# Description: List of file system functions for bash
# Author: Carl C.
# Date: 6/4
# get_full_filenames USAGE:
# ./get_full_filenames /path/to/dir
# Outputs full pathname to each member of the directory separated by newlines.
@awsomesawce
awsomesawce / get_fullname_files.bash
Created June 4, 2021 03:57
Returns newline-separated list of files in a directory. Useful to iterate over an entire directory or place in an array variable.
#!/bin/bash
# Get_Full_Filenames aka ./gff
# Author: Carl C. (awsomesawce at outlook dot com)
########## USAGE ##########
# ./gff /path/to/dir
# Outputs full pathname to each member of the directory separated by
#+newlines.
#### USAGE WITH ARRAYS ####
# typeset -a myArr
# myArr=($(./gff ~/testdir)) # myArr will then contain an indexed array with fullnames of
@awsomesawce
awsomesawce / List of CDN delivered web frameworks.md
Last active October 6, 2020 06:27
List of CDN delivered web frameworks

List of CDN delivered css and js frameworks plus fonts

Link to Gist that is always in sync with this document

imported to Notable

This is the Google 2016 Fonts Refresh collection

<link href="https://fonts.googleapis.com/css2?family=Cabin&family=Inconsolata&family=Nunito&family=Nunito+Sans&family=Pacifico&family=Quicksand&family=Rubik&family=VT323&display=swap" rel="stylesheet">
@enepomnyaschih
enepomnyaschih / base64.js
Last active October 22, 2025 23:55
https://www.npmjs.com/package/byte-base64 - Encode JS Uint8Array, simple array of bytes or native JS string to base64 and back
/*
MIT License
Copyright (c) 2020 Egor Nepomnyaschih
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is