/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo 'eval $(/opt/homebrew/bin/brew shellenv)' >> ~/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
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
# enable mouse support | |
set -g mouse on | |
# set default shell | |
set -g default-shell $SHELL | |
set -g default-command "reattach-to-user-namespace -l ${SHELL}" | |
# copy and paste | |
setw -g mode-keys vi | |
bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy" |
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
#!/bin/sh | |
local_http_proxy=${HTTP_PROXY:-$http_proxy} | |
if [ -n "$local_http_proxy" ] ; then | |
if [ $? -eq 0 ]; then # If variable has username and password, its parse method different | |
http_proxy_host=$(echo $local_http_proxy | sed 's/http:\/\/.*@\(.*\):.*/\1/') | |
http_proxy_port=$(echo $local_http_proxy | sed 's/http:\/\/.*@.*:\(.*\)/\1/' | tr -d "/") | |
http_proxy_user=$(echo $local_http_proxy | sed 's/http:\/\/\(.*\)@.*/\1/' | awk -F: '{print $1}') | |
http_proxy_password=$(echo $local_http_proxy | sed 's/http:\/\/\(.*\)@.*/\1/' | awk -F: '{print $2}') |
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
set nocompatible " be iMproved, required | |
filetype off " required | |
let &t_SI.="\e[5 q" "SI = INSERT mode | |
let &t_SR.="\e[4 q" "SR = REPLACE mode | |
let &t_EI.="\e[1 q" "EI = NORMAL mode (ELSE) | |
" Auto install VimPlug | |
if empty(glob('~/.vim/autoload/plug.vim')) | |
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs |
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 R from "ramda"; | |
type Person = { | |
id: number; | |
name: string; | |
type: string; | |
}; | |
function main() { | |
const array: Person[] = [ |
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
@Resolver() | |
export class HelloResolver { | |
@Authorized() | |
@Query(() => String) | |
hello(): string { | |
return "Hello World"; | |
} | |
} |