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
[Desktop Entry] | |
Name=cmus | |
Comment=open cmus in kitty | |
Exec=/bin/sh -c "$HOME/configs/cmus.sh" | |
Icon=CMakeSetup | |
Terminal=false | |
Type=Application | |
Categories=Music; |
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
// ==UserScript== | |
// @name Reddit auto-expand | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Auto expand reddit posts | |
// @author marg9 | |
// @match https://*.reddit.com/* | |
// @grant none | |
// ==/UserScript== | |
// crdts: https://www.reddit.com/r/Enhancement/comments/fjksmc/tutorial_how_to_auto_expand_both_text_and_image/ |
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
#include <stdio.h> | |
int main(){ | |
int count=0,found=0; | |
int a=2,current=2; | |
while(found<100000){ | |
while(a<current) | |
{ | |
if(current%a==0){ | |
count=1; | |
} |
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
#!/usr/bin/env bash | |
# Imgur script by Bart Nagel <[email protected]> | |
# Improvements by Tino Sino <[email protected]> | |
# Version 6 or more | |
# I release this into the public domain. Do with it what you will. | |
# The latest version can be found at https://github.com/tremby/imgur.sh | |
# API Key provided by Bart; | |
# replace with your own or specify yours as IMGUR_CLIENT_ID environment variable |
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
package main | |
import ( | |
"io/ioutil" | |
"log" | |
"math/rand" | |
"os/exec" | |
"time" | |
) |
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
MERGE INTO SIJL.USERS AS target | |
USING ( | |
SELECT '<username>' AS username, '<email>' AS email | |
) AS source | |
ON (target.username = source.username AND target.email = source.email) | |
WHEN MATCHED THEN | |
DELETE | |
WHEN NOT MATCHED THEN |
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
#!/usr/bin/env python3 | |
import csv | |
import sys | |
# Read command line arguments | |
field_name = sys.argv[1] | |
default_value = sys.argv[2] | |
# Open the input CSV file |
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 csv | |
import sys | |
# Get the filename from the command line arguments | |
filename = sys.argv[1] | |
# Open the file in read mode | |
with open(filename, 'r') as csv_file: | |
# Read the file into a CSV reader object | |
reader = csv.reader(csv_file) |
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
;; this is another version that doesn't require any user parameters | |
(defun org-babel-execute:chess (body params) | |
"Execute a block of Chess code with org-babel. | |
This function is called by `org-babel-execute-src-block'." | |
(let* ((output-file (concat (file-name-sans-extension (buffer-file-name)) (format "_%s_chess_output.svg" (format-time-string "%Y-%m-%d_%H-%M-%S")) )) | |
(notation (cdr (assq :notation params))) | |
(extension (if (equal notation "fen") ".fen" ".pgn")) | |
(notation-file (make-temp-file "chess-notation" nil extension)) | |
(cmd (format "python ~/configs/elchess.py %s %s %s" notation-file output-file notation))) |
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
To download all the files, simple run: | |
cat pgnmentor.txt | parallel --gnu "wget --no-check-certificate {}" | |
make sure that parallel is installed |