View nginx.conf.part
## | |
# Virtual Host Configs | |
## | |
include /etc/nginx/conf.d/*.conf; | |
include /etc/nginx/sites-enabled/*; | |
server { | |
server_name dugovic.mooo.com; | |
listen 80; |
View challengeUser.js
export async function challengeUser( | |
whiteAccessToken: string, | |
blackAccessToken: string, | |
username: string | |
): Promise<ChallengeGame> { | |
const response = await createClient(whiteAccessToken).post< | |
CreateChallengeResponse | |
>( | |
`/api/challenge/${username}`, | |
stringify({ |
View pipfilelock-to-requirements.sh
# | |
# https://github.com/pypa/pipenv/issues/3493#issuecomment-651148507 | |
cat Pipfile.lock \ | |
| grep -B1 '"hashes"\|"version": ' \ | |
| grep -v '"markers": \|"hashes": ' \ | |
| grep ": {\|version" \ | |
| sed -e 's/: {$//g' \ | |
| tr '\n' ',' | tr -s ' ' ' ' \ | |
| sed -e 's/, "version": "//g;s/", "/ /g;s/"//g;s/,//g' \ | |
| tr ' ' '\n' \ |
View Lichess_Board_Resize.user.js
(function() { | |
function myzoom() { | |
document.body.setAttribute('style', '--zoom:140'); | |
window.lichess.dispatchEvent(window, 'resize'); | |
} | |
window.setInterval(myzoom, 1000); | |
})(); |
View gist:64b7638338fa7d366b22e113ed9669b3
function play(min,sec){var challenges=$(".challenge");if(arguments.length===0)return challenges.eq(Math.floor(Math.random()*challenges.length)).find(".accept").click();else{challenges=challenges.filter(function(){return $(this).find(".desc").text().search(new RegExp(min+"\\+"+sec))!==-1});if(challenges.length===0)console.log("No challenges matching the specified time control");else{return challenges.eq(Math.floor(Math.random()*challenges.length)).find(".accept").click()}}} |
View stockfish.js
This file has been truncated, but you can view the full file.
var Module = { | |
print: (function(stdout) { | |
postMessage(stdout) | |
}) | |
}; | |
var Module; | |
if (!Module) Module = (typeof Module !== "undefined" ? Module : null) || {}; | |
var moduleOverrides = {}; | |
for (var key in Module) { |
View sl.sh
#!/bin/bash | |
x=1 | |
clear | |
while [ $? -eq 0 ] | |
do | |
x=$(( $x + 1 )) | |
/home/lila/sl/sl -dew -$x | |
done | |
clear && fortune | cowsay |
View chess_game_analyzer_v39.14.beta.py
# -*- coding: utf-8 -*- | |
""" | |
I. About the script | |
1. It takes a pgn file with games in it and analyze those | |
games there one by one if there are more than one game | |
2. It mainly uses Stockfish uci engine during development. | |
Other uci engines can be used provided those engines support | |
multipv mode |
View test-epd.py
#!/usr/bin/python | |
import chess | |
import chess.uci | |
import sys | |
import time | |
def test_epd(engine, epd): | |
position = chess.Board() |
View E4_Best_by_Test.user.js
// ==UserScript== | |
// @name E4, Best by Test | |
// @namespace https://github.com/ddugovic/UserScripts | |
// @description Best by test! | |
// @author ddugovic | |
// @copyright 2017+, ddugovic | |
// @license CC0 1.0 Universal | |
// @match https://lichess.org/training/coordinate | |
// @require https://lichess1.org/assets/compiled/coordinate.js?v=1932 | |
// @grant none |
NewerOlder