Skip to content

Instantly share code, notes, and snippets.

@Jonalogy
Jonalogy / handling_multiple_github_accounts.md
Last active May 21, 2024 17:16
Handling Multiple Github Accounts on MacOS

Handling Multiple Github Accounts on MacOS

The only way I've succeeded so far is to employ SSH.

Assuming you are new to this like me, first I'd like to share with you that your Mac has a SSH config file in a .ssh directory. The config file is where you draw relations of your SSH keys to each GitHub (or Bitbucket) account, and all your SSH keys generated are saved into .ssh directory by default. You can navigate to it by running cd ~/.ssh within your terminal, open the config file with any editor, and it should look something like this:

Host *
 AddKeysToAgent yes

> UseKeyChain yes

@FbN
FbN / vite.config.js
Last active May 21, 2024 17:16
vite.config.js node built-in polyfills
// yarn add --dev @esbuild-plugins/node-globals-polyfill
import { NodeGlobalsPolyfillPlugin } from '@esbuild-plugins/node-globals-polyfill'
// yarn add --dev @esbuild-plugins/node-modules-polyfill
import { NodeModulesPolyfillPlugin } from '@esbuild-plugins/node-modules-polyfill'
// You don't need to add this to deps, it's included by @esbuild-plugins/node-modules-polyfill
import rollupNodePolyFill from 'rollup-plugin-node-polyfills'
export default {
resolve: {
alias: {
@realvjy
realvjy / ChoasLinesShader.metal
Last active May 21, 2024 17:14
Choas Lines - Metal Shader
// Lines
float hash( float n ) {
return fract(sin(n)*753.5453123);
}
// Slight modification of iq's noise function.
float noise(vector_float2 x )
{
vector_float2 p = floor(x);
vector_float2 f = fract(x);
@wallyhall
wallyhall / apache_airflow_sso_howto.md
Last active May 21, 2024 17:14
Apache Airflow Azure AAD SSO howto

The following instructions for enabling Azure SSO for Apache Airflow nearly take you all the way - but fall short a couple of details around the configuration of airflow itself:

https://objectpartners.com/2021/12/24/enterprise-auth-for-airflow-azure-ad

All the "Azure" instructions there can be safely followed - the resulting webserver_config.py (which can be injected into a dockerised Airflow in /opt/airflow/webserver_config.py) can be built from the following:

from __future__ import annotations

import os
@Seveen
Seveen / ease_helpers.odin
Created May 19, 2024 19:48
Easing helpers
// Helpers ===========================
AnimationInfo :: struct {
animation: proc(info: AnimationInfo),
value: ^f32,
goal: f32,
}
chain :: proc(
tween: ^ease.Flux_Tween($T),
@fnky
fnky / ANSI.md
Last active May 21, 2024 17:06
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@rxaviers
rxaviers / gist:7360908
Last active May 21, 2024 16:56
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue:
@mabarbeau
mabarbeau / git-rebase-auto-resolve-yarn-lock.zsh
Last active May 21, 2024 16:56
A `git rebase` that auto resolves conflicts in yarn.lock
rebase () {
if [ $# -ne 0 ]; then;
locks=$(find . -name "yarn.lock" -not -path "./node_modules/*" -not -path "*/node_modules/*" | tr '\n' ' ')
output=$(git rebase $@) && echo $output
if echo $output | grep 'CONFLICT' | grep -q 'yarn.lock'; then
echo -e "\n\033[4;33mConflicts found in yarn.lock\n\033[0m\033[2;20mAuto merging\033[0m\n" \
&& git checkout $1 -- $(echo $locks) \
&& yarn install \
@loretoparisi
loretoparisi / github_quick_setup.md
Last active May 21, 2024 16:54
Github Quick setup β€” if you’ve done this kind of thing before

Get started by creating a new file or uploading an existing file. We recommend every repository include a README, LICENSE, and .gitignore.

…or create a new repository on the command line

echo "# myrepo" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/loretoparisi/myrepo.git
git push -u origin master