Skip to content

Instantly share code, notes, and snippets.

View ddugovic's full-sized avatar
💭
I may be slow to respond.

Daniel Dugovic ddugovic

💭
I may be slow to respond.
View GitHub Profile
@ornicar
ornicar / lichess.proxy.conf
Last active July 16, 2021 07:08
Set up a lichess proxy to bypass firewalls and play chess at school/work
# /etc/nginx/sites-enabled/lichess.proxy.conf
# Replace "lichess.scalex.org" by your own domain.
# Note: This only works for the "en" subdomain.
server {
listen 80;
server_name socket.en.lichess.scalex.org;
location / {
proxy_set_header Host socket.en.lichess.org;
proxy_http_version 1.1;
# Simple SonarQube database and user creation for Postgresql
#
sudo -u postgres psql postgres
CREATE DATABASE sonar;
CREATE USER sonar WITH PASSWORD 'verysecret';
GRANT ALL PRIVILEGES ON DATABASE sonar TO sonar;
@mathieuancelin
mathieuancelin / GoodOldPlayframework.scala
Last active April 28, 2019 19:06
A really dirty way to use Playframework without Guice
package old.play
import java.sql.Connection
import java.util.concurrent.atomic.{AtomicInteger, AtomicReference}
import java.util.concurrent.{Executors, ThreadFactory}
import akka.actor.{ActorSystem, Scheduler}
import akka.stream.Materializer
import play.api.ApplicationLoader.Context
import play.api.Mode.Mode
@beefy
beefy / chess_scrape.py
Last active December 29, 2020 03:56
Scrapes all live chess game PGNs from chess.com and concatenates the resulting files
#!/usr/bin/python
import spynner
import pyquery
import urllib
import os
# author: Nate Schultz
# contact: github.com/beefy
# created: 10/22/16
@niklasf
niklasf / atomic.md5sums
Last active November 16, 2016 15:29
MD5SUMS of 5 piece atomic syzygy tables
5f09f78f986d440d5fda3cd28b335eb3 KBBBvK.atbw
30405c5366213d43f4acf68b10c5ca58 KBBBvK.atbz
8314a33d3042c8ab76ca365d492c7fd2 KBBNvK.atbw
996aa9ef24cadf6342e15212b8ca91a1 KBBNvK.atbz
2087b9823af4ca34e0f1692b917650e5 KBBPvK.atbw
19b934721c02787d50b471ef44e99bd7 KBBPvK.atbz
0b12a60dcd347e5db4dcb3a19a351b1f KBBvK.atbw
2cdbcd87dbd5a2e069b121d08eb68138 KBBvK.atbz
6d57f8073f620c5a4c0e33ecda89e79a KBBvKB.atbw
a382621f6953995d3948b5f45d5cf7bb KBBvKB.atbz
@andreij
andreij / pubapi_docs.html
Last active May 10, 2022 15:59 — forked from BiviaBen/pubapi_docs.html
Chess.com Published-Data API
<p>The PubAPI is a read-only REST API that responds with JSON-LD data. Our goal is to re-package all currently public data from the website and make it available via the PubAPI. "Public Data" is information available to people who are not logged in, such as player data, game data, and club/tournament information. This excludes private information that is restricted to the logged in user, such as game chat and conditional moves.</p>
<p>This is read-only data. You cannot send game-moves or other commands to Chess.com from this system. If you wish to send commands, you will be interested in the Interactive API releasing later this year.</p>
<p>To use the PubAPI:</p>
<ol>
<li>determine the data you want, and compose the URL for it based on the endpoint URL pattern</li>
<li>request that URL in your browser, program, <a href="https://www.getpostman.com/">Postman</a>, cURL, or <a href="https://en.wikipedia.org/wiki/IP_over_Avian_Carriers">pigeon</a>.</li>
<li>enjoy the JSON <img src="https://www.chess.com/bundles/we
@mdstoy
mdstoy / get-kifu
Created January 12, 2018 15:23
(Lazy) One liner that create csa file from shogi wars kifu url
curl <kifu-url> | grep receiveMove | sed -E 's/( +receiveMove\("|[A-Z_]+"\);|,L[0-9]+)//g' | sed 's/^/PI\t+\t/' | sed 's/\t/\n/g' > [output-file]
@WOnder93
WOnder93 / check_benches.sh
Last active March 29, 2018 12:37
Stockfish - scripts for automated bench comparison
#!/bin/bash
if [ $# -eq 0 ]; then
echo "usage: [SYZYGY_PATH='...'] [BENCH_ARGS='...'] $0 COMMIT..."
echo
echo " Prints bench for each COMMIT. Output is stored in 'bench-COMMIT.log'."
echo
echo " Command-line arguments:"
echo " COMMIT... list of commits to check"
echo
@DerEnderKeks
DerEnderKeks / WebhookTutorial.md
Last active December 4, 2023 20:28
Simple Webhook Tutorial (Twitter -> Discord using IFTTT)

Simple Webhook Tutorial

In this tutorial, I will be explaining how to set up a simple webhook to relay your tweets to a Discord channel.

Step 1 - Register on IFTTT

  1. Go to https://ifttt.com/ and create an account (if you don't already have one).

Step 2 - Make a Discord Webhook

  1. Find the Discord channel in which you would like to send Tweets.

  2. In the settings for that channel, find the Webhooks option and create a new webhook.

<html>
<head>
<style>
body {
font-family: 'Noto Sans';
overflow: hidden;
}
input {
width: 100%;
}