This file contains hidden or 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
#!/bin/bash | |
# Script to mark all GitHub notifications as read | |
# Requires GITHUB_TOKEN environment variable to be set | |
# Check if GITHUB_TOKEN is set | |
if [ -z "$GITHUB_TOKEN" ]; then | |
echo "Error: GITHUB_TOKEN environment variable is not set" | |
echo "Please set it with: export GITHUB_TOKEN=your_github_token" | |
exit 1 | |
fi |
This file contains hidden or 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
function repo() { | |
# Save current directory | |
local cwd=$(pwd) | |
# Change to given directory | |
if [[ -n "$1" ]]; then | |
cd $1 | |
fi | |
local remote=$(git config --get remote.origin.url) |
This file contains hidden or 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
# add this to your shell init code, i.e. .zshrc | |
function etherscan() { | |
url="https://etherscan.io" | |
if [[ -z "$1" ]]; then | |
open $url | |
else | |
case ${#1} in | |
42) # 42 chars => account address | |
open "${url}/address/${1}" |
This file contains hidden or 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
function issues() { | |
local remote=$(git config --get remote.origin.url) | |
local repo=$(echo $remote | sed 's/.*github.com[:/]\(.*\).git/\1/') | |
local url="https://github.com/${repo}/issues" | |
echo $url | |
open $url | |
} |
This file contains hidden or 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
/* | |
# Query the OpenAI API | |
- Prompts the user for an OPENAI_API_KEY | |
- Prompts the user for a prompt to send to OpenAI | |
- Sends the prompt to OpenAI | |
- Displays the response from OpenAI in the built-in editor | |
*/ | |
// Name: OpenAI Playground |
This file contains hidden or 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
BEGIN MESSAGE. | |
6RWRPDhd8eBIrVB AO8mtW3IvgSAmjt bqwx3aajEWGQHik oty4A5bUwnTIRIk | |
mnyYLYSZUzxtBp7 5RqimeYSY5HTCKq 6Xr2MZHgg4UNQDZ l9vo1ZoJjfbYIco | |
8NlcsQGTVOhulqf o1Jcs5GVRLtka3i dCrOT3ldBQ4JChk FDjlNp9Qbe59ou8 | |
UcQnDInpTuGTfXz XhrVcSriUzXxLwH yS2iD. | |
END MESSAGE. |
This file contains hidden or 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
local modifier = {"alt", "cmd"} | |
local homeDir = os.getenv("HOME") | |
local sounds = { | |
[1] = "mgs.mp3", | |
[2] = "wow.mp3", | |
[3] = "nice.m4a", | |
[4] = "LennartLache.wav", | |
[5] = "dumm.m4a", | |
[9] = "boah_alta_geil.mp3", |
This file contains hidden or 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 React from 'react'; | |
import { TextInput, TextInputProps } from 'react-native'; | |
import styled from 'styled-components/native'; | |
import { ColorProps, SpaceProps, color, compose, space } from 'styled-system'; | |
interface WrapperProps extends ColorProps, SpaceProps { | |
// ColorProps will et al. add `bg`, `backgroundColor` props | |
// SpaceProps => `margin`, `padding`, `paddingTop` etc. | |
} |
This file contains hidden or 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
local modifier = {"alt"} | |
function rgbToHex(red, green, blue) | |
return "#" .. string.format("%x", red) .. string.format("%x", green) .. | |
string.format("%x", blue) | |
end | |
function hslToRgb(h, s, l) | |
if s == 0 then return l, l, l end | |
local function to(p, q, t) |