Skip to content

Instantly share code, notes, and snippets.

View rsa16's full-sized avatar
๐Ÿ‘
i spek engrish

Rehan rsa16

๐Ÿ‘
i spek engrish
View GitHub Profile
@rsa16
rsa16 / ytsearch.sh
Created October 29, 2022 00:41
search youtube and download
#!/bin/bash
tempfile=$(mktemp)
youtube_dl_log=$(mktemp)
youtube-dl -j "ytsearch5:$*" > $tempfile
# workaround for lack of mapfile in bash < 4
# https://stackoverflow.com/a/41475317/6598435
while IFS= read -r line
@rsa16
rsa16 / copyrighter.sh
Created December 4, 2022 20:01
Auto paste copyrights on every c++ and header file you got
#!/bin/bash
if [ -z "$1" ]
then
echo "You must supply your name as an argument."
exit -1
fi
copyright_text=" Copyright (c) $(date +"%Y"), $1\n All rights reserved.\n\n This source code is licensed under the BSD-style license found in the\n LICENSE file in the root directory of this source tree."
for file in $(find .. -type f -name \*.cpp | grep -v external | grep -v build); do