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
| const invert = (contrast, invert, sepia, brightness) => { | |
| const existingStyle = document.getElementById('dark-mode'); | |
| let style = document.createElement("style"); | |
| if (existingStyle) { | |
| style = existingStyle; | |
| } else { | |
| stye = document.createElement('style'); | |
| style.id = 'dark-mode'; | |
| document.head.appendChild(style); | |
| } |
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
| let bars = document.getElementsByClassName('ytd-thumbnail-overlay-resume-playback-renderer'); | |
| let result = ''; | |
| for (barIndex in bars) { | |
| let bar = bars[barIndex]; | |
| if (!bar) continue; | |
| if (!bar.style) continue; | |
| let progress = parseFloat(bar.style.width) / 100.0; | |
| if (progress < 1) { | |
| let root = bar.parentElement.parentElement.parentElement.parentElement.parentElement; | |
| let meta = root.querySelector('#video-title'); |
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 <chrono> | |
| #include <condition_variable> | |
| #include <iostream> | |
| #include <mutex> | |
| #include <thread> | |
| int main() { | |
| std::mutex myMutex; |
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 <iostream> | |
| #include <thread> | |
| #include <vector> | |
| int main() { | |
| typedef std::vector<std::thread>::size_type vsize; |
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 <dirent.h> | |
| #include <fcntl.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <sys/stat.h> | |
| void fail(const char *path) { | |
| fprintf(stderr, "Error while processing %s, ignoring\n", path); |
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
| version: '3' | |
| services: | |
| hoottit: | |
| image: hoottit | |
| container_name: "hoottit" | |
| environment: | |
| - HOOT_MONGO=mongodb://mongo:27017/hoot | |
| links: | |
| - mongo | |
| depends_on: |
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 <iostream> | |
| #include <vector> | |
| using namespace std; | |
| vector<int> graph[100005]; | |
| const int MOD = 1000000007; | |
| long long memf[100005]; | |
| long long memg[100005]; |
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 <iostream> | |
| #include <vector> | |
| using namespace std; | |
| vector<int> graph[100005]; | |
| long long mem[100005][2][2]; | |
| const int MOD = 1000000007; |
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 <iostream> | |
| #include <map> | |
| #include <set> | |
| #include <tuple> | |
| #include <queue> | |
| using namespace std; | |
| const long long MOD = 1000000007; |
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
| set cc=80 | |
| set runtimepath^=~/.vim/bundle/ctrlp.vim | |
| set expandtab | |
| set textwidth=120 | |
| set tabstop=4 | |
| set softtabstop=4 | |
| set shiftwidth=4 | |
| set autoindent | |
| set relativenumber |