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/bash | |
| # Check if Neovim is installed | |
| if ! command -v nvim &> /dev/null | |
| then | |
| read -p "Neovim is not installed. Do you have root access to install it globally? (y/n) " root_choice | |
| case "$root_choice" in | |
| y|Y ) | |
| # OS-specific Neovim installation | |
| if [[ -x "$(command -v apt-get)" ]]; then |
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
| server: | |
| http_listen_port: 9080 | |
| grpc_listen_port: 0 | |
| positions: | |
| filename: /data/positions.yaml | |
| clients: | |
| - url: ${LOKI_HOST}/loki/api/v1/push | |
| basic_auth: |
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
| /** | |
| * Author: Mohamed Elashri | |
| * Date: 01 Jan 2024 | |
| * License: MIT | |
| * | |
| * Description: | |
| * This program is designed to fetch and display memory statistics in a human-readable format. | |
| * It provides detailed information about total, used, free, cached, application, and wired memory, | |
| * along with swap usage for macOS systems. The program uses Mach API and sysctl to gather memory statistics. | |
| * |
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
| javascript:(function(){ | |
| var pathArray = location.pathname.split('/'); | |
| if(pathArray.length >= 3 && location.hostname === 'github.com') { | |
| var owner = pathArray[1]; | |
| var repo = pathArray[2]; | |
| var githubFeedUrl = 'https://github.com/' + owner + '/' + repo + '/releases.atom'; | |
| var freshRssUrl = '{freshrss_url_here}/i/?c=feed&a=add&url_rss=' + encodeURIComponent(githubFeedUrl); | |
| window.open(freshRssUrl, '_blank').opener = null; | |
| } else { | |
| alert('Not a GitHub repository page'); |
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
| // ==UserScript== | |
| // @name Hacker News Comprehensive Enhancements (Light) | |
| // @namespace http://melashri.net/hn | |
| // @version 1.3 | |
| // @description A comprehensive enhancement script for Hacker News | |
| // @author melashri | |
| // @match https://news.ycombinator.com/* | |
| // @grant GM_addStyle | |
| // ==/UserScript== |
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/bash | |
| # Function to check if a command exists | |
| command_exists() { | |
| command -v "$1" >/dev/null 2>&1 | |
| } | |
| # Function to install Helix on Ubuntu | |
| install_on_ubuntu() { | |
| echo "Installing Helix on Ubuntu..." |
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
| :root { | |
| --background: #282a36; | |
| --current-line: #44475a; | |
| --selection: #44475a; | |
| --foreground: #f8f8f2; | |
| --comment: #bfbfbf; | |
| --cyan: #8be9fd; | |
| --green: #50fa7b; | |
| --orange: #ffb86c; | |
| --pink: #ff79c6; |
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
| // ==UserScript== | |
| // @name Auto Continue for ChatGPT | |
| // @namespace http://melashri.net | |
| // @version 0.1 | |
| // @description Automatically clicks "Continue generating" button on OpenAI's ChatGPT website. | |
| // @author Mohamed Elashri | |
| // @match https://chat.openai.com/* | |
| // @grant none | |
| // ==/UserScript== |
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 <string.h> // For strncmp | |
| #define SIGNATURE_SIZE 8 | |
| #define MAX_OFFSET 2048 | |
| int main() { | |
| FILE* file = fopen("data.h5", "rb"); | |
| if (!file) { | |
| printf("Unable to open file!\n"); |
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
| pip uninstall torch | |
| pip cache purge | |
| pip install torch torchvision --pre -f https://download.pytorch.org/whl/nightly/cu121/torch_nightly.html | |
| pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu117 |