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/sh | |
| # Keywords are considered "cheating" for the purposes of this script. This includes, as of writing, changeling, amass, living weapon, awaken, embalm, fabricate, eternalize, afterlife, incubate, for mirrodin!, and gift | |
| # The query being done is an approximation, but should be 99.9% accurate | |
| # Improvements: - Doesn't include goblin barrage or quest for the goblin lord, somehow compare number of type to number of name | |
| # https://stackoverflow.com/questions/24656131/regex-for-existence-of-some-words-whose-order-doesnt-matter | |
| # - Check that tiers are balanced | |
| # - Overall testing | |
| filename="type_log.csv" && \ | |
| ctype="$(shuf -n1 -e $(curl -s 'https://api.scryfall.com/catalog/creature-types' | jq .data[]))" && \ |
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/sh | |
| VIDEO="${1:-test.mp4}" | |
| GIF="${2:-test.gif}" | |
| ffmpeg -ss 61.0 -t 2.5 -i "$VIDEO" -filter_complex "[0:v] fps=12,scale=w=480:h=-1,split [a][b];[a] palettegen=stats_mode=single [p];[b][p] paletteuse=new=1" "$GIF" | |
| chafa "$GIF" |
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/sh | |
| if [ "$(id -u)" -ne 0 ]; then | |
| echo "This script must be run as root" | |
| exit 1 | |
| fi | |
| USER=$(ls /home) | |
| CHANNEL="$(echo $@ | awk -F '/' '{print $NF}')" |
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/sh | |
| USER=$(ls /home) | |
| mkdir -p /home/$USER/YouTube | |
| for I in $(curl -s "https://www.youtube.com/feeds/videos.xml?channel_id=$1" | awk -F '"' '/watch/ {print $4}') | |
| do | |
| FORMATS=$(youtube-dl -F $I) | |
| TITLE="$(youtube-dl --get-title $I)" |
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
| //Code that scrapes webpages | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <iostream> | |
| #include <string> | |
| #include <fstream> | |
| using namespace std; | |
| string 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
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <stdbool.h> | |
| #define SIZE 999999 | |
| #define WORD 255 | |
| int n; | |
| int m; |
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
| #include <stdlib.h> | |
| #include <stdio.h> | |
| #include <string> | |
| #include <iostream> | |
| #include <thread> | |
| #include <chrono> | |
| #include <fstream> | |
| #include <time.h> | |
| #include <unistd.h> | |
| using namespace std; |
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
| //Raspberry pi configuration | |
| #include <iostream> | |
| #include <string> | |
| #include <fstream> | |
| #include <stdlib.h> | |
| #include <stdio.h> | |
| using namespace std; | |
| string name; |
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
| //Code that scrapes veekun for pokedex data and displays it to user | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <iostream> | |
| #include <string> | |
| #include <fstream> | |
| #include <algorithm> | |
| #include <time.h> | |
| #include <ctype.h> |
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
| #include <X11/Xlib.h> | |
| #include <assert.h> | |
| #include <unistd.h> | |
| #define NIL (0) | |
| Display *dpy = XOpenDisplay(NIL); | |
| assert(dpy); | |
| int blackColor = BlackPixel(dpy, DefaultScreen(dpy)); |
NewerOlder