Skip to content

Instantly share code, notes, and snippets.

View ABODFTW's full-sized avatar
💻
Coding..

Abod ABODFTW

💻
Coding..
View GitHub Profile
@palewire
palewire / README.md
Last active May 5, 2024 05:41
How to push tagged Docker releases to Google Artifact Registry with a GitHub Action

How to push tagged Docker releases to Google Artifact Registry with a GitHub Action

Here's how I configured a GitHub Action so that a new version issued by GitHub's release interface will build a Dockerfile, tag it with the version number and upload it to Google Artifact Registry.

Before you attempt the steps below, you need the following:

  • A GitHub repository that contains a working Dockerfile
  • The Google Cloud SDK tool gcloud installed and authenticated

Create a Workload Identity Federation

@itsabdessalam
itsabdessalam / copy.js
Last active September 29, 2020 00:09
Copy to clipboard
// if code snippet is inside input or textarea tags
function copy() {
var codeSnippet = document.querySelector("#code-snippet");
codeSnippet.select();
document.execCommand("copy");
}
document.querySelector("#copy").addEventListener("click", copy);
// if code snippet is inside pre or code tags
function copy() {
@xmeng1
xmeng1 / wsl2-network.ps1
Created July 14, 2019 06:50
WSL2 Port forwarding port to linux
$remoteport = bash.exe -c "ifconfig eth0 | grep 'inet '"
$found = $remoteport -match '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}';
if( $found ){
$remoteport = $matches[0];
} else{
echo "The Script Exited, the ip address of WSL 2 cannot be found";
exit;
}
export TERM="xterm-256color" # This sets up colors properly
# workaround as per https://superuser.com/questions/1222867/zsh-completion-functions-broken
FPATH=$HOME/.oh-my-zsh/plugins/git:$HOME/.oh-my-zsh/functions:$HOME/.oh-my-zsh/completions:/usr/share/zsh/site-functions:/usr/share/zsh/$ZSH_VERSION/functions
export FPATH
# set shell
export SHELL=/usr/bin/zsh
@bradtraversy
bradtraversy / vscode_shortcuts.md
Last active May 6, 2024 12:38
Helpful shortcuts for VSCode

VSCode Shortcuts

List of helpful shortcuts for faster coding

If you have any other helpful shortcuts, feel free to add in the comments of this gist :)

Official List of all commands

@kauffmanes
kauffmanes / install_anaconda.md
Last active May 6, 2024 02:02
Install Anaconda on Windows Subsystem for Linux (WSL)

Thanks everyone for commenting/contributing! I made this in college for a class and I no longer really use the technology. I encourage you all to help each other, but I probably won't be answering questions anymore.

This article is also on my blog: https://emilykauffman.com/blog/install-anaconda-on-wsl

Note: $ denotes the start of a command. Don't actually type this.

Steps to Install Anaconda on Windows Ubuntu Terminal

  1. Install WSL (Ubuntu for Windows - can be found in Windows Store). I recommend the latest version (I'm using 18.04) because there are some bugs they worked out during 14/16 (microsoft/WSL#785)
  2. Go to https://repo.continuum.io/archive to find the list of Anaconda releases
  3. Select the release you want. I have a 64-bit computer, so I chose the latest release ending in x86_64.sh. If I had a 32-bit computer, I'd select the x86.sh version. If you accidentally try to install the wrong one, you'll get a warning in the terminal. I chose `Anaconda3-5.2.0-Li
@matthewjberger
matthewjberger / instructions.md
Last active May 4, 2024 11:12
Install a nerd font on ubuntu

1.) Download a Nerd Font

2.) Unzip and copy to ~/.fonts

3.) Run the command fc-cache -fv to manually rebuild the font cache

@Pullusb
Pullusb / CSV_to_Vcards.py
Created October 8, 2015 18:56
python utils convert CSV files to vcf cards
# -*- coding: utf-8 -*-
#python 3.x
import csv
import sys
#convert a "comma separated values" file to vcf contact cards
#USAGE:
#CSV_to_Vcards.py CSV_filename
@qgerome
qgerome / diff_freeze.py
Created May 9, 2014 08:52
How to compare or diff 2 pip freeze or 2 requirements.txt in Python
"""
pip install click
"""
import click
import itertools