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
export PATH="/opt/homebrew/bin:$PATH" # Setup Homebrew | |
eval "$(starship init zsh)" # Setup starship | |
source $HOME/.config/dotflies/*.zsh # Setup custom dotfiles | |
# Download Znap, if it's not there yet. | |
[[ -f $HOME/.znap/zsh-snap/znap.zsh ]] || | |
git clone --depth 1 -- \ | |
https://github.com/marlonrichert/zsh-snap.git $HOME/.znap/zsh-snap |
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/bash | |
echo "Removing Oculus folder..." | |
rm -rf ./Assets/Oculus ./Assets/Oculus.meta | |
echo "Removing files named with oculus, OVR, AndroidManifest, vrapi, vrlib, vrplatlib..." | |
find . -name "oculus" -exec rm -rf {} \; | |
find . -name "OVR" -exec rm -rf {} \; | |
find . -name "AndroidManifest" -exec rm -rf {} \; | |
find . -name "vrapi" -exec rm -rf {} \; | |
find . -name "vrlib" -exec rm -rf {} \; |
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
# Created by https://www.toptal.com/developers/gitignore/api/macos,unity | |
# Edit at https://www.toptal.com/developers/gitignore?templates=macos,unity | |
### macOS ### | |
# General | |
.DS_Store | |
.AppleDouble | |
.LSOverride |
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/bash | |
echo "Removing Oculus folder..." | |
rm -rf ./Assets/Oculus ./Assets/Oculus.meta | |
echo "Removing files named with oculus, OVR, AndroidManifest, vrapi, vrlib, vrplatlib..." | |
find . -name "oculus" -exec rm -rf {} \; | |
find . -name "OVR" -exec rm -rf {} \; | |
find . -name "AndroidManifest" -exec rm -rf {} \; | |
find . -name "vrapi" -exec rm -rf {} \; | |
find . -name "vrlib" -exec rm -rf {} \; |
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 numpy as np | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
import matplotlib.image as mpimg | |
import matplotlib.patches as patches | |
import matplotlib.text as text | |
def rgb2gray(rgb): | |
return np.dot(rgb[...,:3], [0.2989, 0.5870, 0.1140]) |
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
function gifify() { | |
if [[ -n "$1" ]]; then | |
if [[ $2 == '--good' ]]; then | |
ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png | |
time convert -verbose +dither -layers Optimize -resize 1200x1200\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif | |
rm out-static*.png | |
else | |
ffmpeg -i $1 -vf scale=1200:-1 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif | |
fi | |
else |
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
# Usage: gifify foobar [--good] | |
gifify () { | |
if [[ -n "$1" ]]; then | |
if [[ $2 == '--good' ]]; then | |
ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png | |
time convert -verbose +dither -layers Optimize -resize 1200x1200\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif | |
rm out-static*.png | |
else | |
ffmpeg -i $1 -vf scale=1200:-1 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif |
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
// | |
// TrackableScrollView.swift | |
// ToutiaoARDemo | |
// | |
// Created by Frad LEE on 2020/6/21. | |
// Copyright © 2020 Frad LEE. All rights reserved. | |
// | |
import SwiftUI |
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
func timeString(time: Double) -> String { | |
return String(format: "%.1f", time) | |
} |
NewerOlder