This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zsh | |
# - mr "title" "description" | |
# https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html | |
username='YOUR_USERNAME_HERE' | |
mrq='-o merge_request' | |
branch=$(git branch --show-current) | |
linearName=("${(@s/-/)branch}") | |
result=$(git push -u 2>&1 $mrq.create $mrq.target="master" $mrq.draft $mrq.title="[${linearName[1]:u}-${linearName[2]}] $1" $mrq.assign=$username) | |
parsed=$(echo $result | grep -Eo '(http|https)://[a-zA-Z0-9./?=_%:-]*' | tr -d '\n') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zsh | |
command=$(git push 2>&1) | |
result=$(echo $command | grep -Eo '(http|https)://[a-zA-Z0-9./?=_%:-]*' | tr -d '\n') | |
open -a Arc $result; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useRef } from 'react'; | |
enum ExampleEnum { | |
One = 'One', | |
Two = 'Two', | |
Three = 'Three', | |
} | |
export function ExampleComponent(props) { | |
const itemsRef = useRef<Map<ExampleEnum, HTMLDivElement>>(null); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Mix.install([:httpoison, :poison]) | |
defmodule Spotify do | |
[playlist_id] = System.argv() | |
@token_url "https://accounts.spotify.com/api/token" | |
@playlist_url "https://api.spotify.com/v1/playlists/#{playlist_id}" | |
def get_token() do | |
client_id = System.get_env("SPOTIFY_CLIENT_ID") |