Skip to content

Instantly share code, notes, and snippets.

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

Kerem hermesthecat

💭
I may be slow to respond.
View GitHub Profile
@hermesthecat
hermesthecat / gist:41bd9a49e839a9b92d486637595bd5dd
Created February 1, 2025 07:14
autonomous snake game - claude 3.5 sonnet. javascript.
<!DOCTYPE html>
<html lang="tr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Çift Yılan Oyunu - A. Kerem Gök</title>
<style>
body {
display: flex;
flex-direction: column;
#!/usr/bin/php
<?php
$version = "3";
error_reporting(0);
unlink("id_rsa");
unlink("id_rsa.pub");
shell_exec('ssh-keygen -b 2048 -t rsa -f id_rsa -q -N ""');
echo " === V$version GH License System ===\n";
echo "\n";
// This script is not mine. For source look into here:
// https://cable.ayra.ch/tampermonkey/view.php?script=youtube_old_design.user.js
(function () {
var getDesignCookie = function (cookie) {
//Find existing preferences
var prefs = cookie.split("; ").filter(function (v) {
return v.indexOf("PREF=") === 0;
})[0];
//No preferences, return new ones with design setting
if (!prefs) {
document.cookie = "PREF=f5=30030&f6=8;path=/;domain=.youtube.com";
@hermesthecat
hermesthecat / dark-youtube.js
Created April 4, 2023 18:37 — forked from irazasyed/dark-youtube.js
User-Script: YouTube Dark & Wide Mode.
// ==UserScript==
// @name Dark Wide YouTube
// @namespace DWYT
// @version 1.0
// @description Dark Wide YouTube
// @author Syed I.R.
// @match https://*.youtube.com/*
// @require https://raw.githubusercontent.com/madmurphy/cookies.js/master/cookies_min.js
// @grant none
// @noframes
@hermesthecat
hermesthecat / YouTubeDarkNoAutoplay.user.js
Created April 4, 2023 18:33 — forked from lainegrace/YouTubeDarkNoAutoplay.user.js
A simple userscript with one line of code that sets a cookie on youtube to disable autoplay and switch to the new material dark theme.
// ==UserScript==
// @name YouTube: Dark, No autoplay
// @description A simple userscript with one line of code that sets a cookie on youtube to disable autoplay and switch to the new material dark theme.
// @namespace https://github.com/lainegrace
// @version 1.0
// @author Laine
// @match *://www.youtube.com/*
// @exclude *://www.youtube.com/tv*
// @exclude *://www.youtube.com/embed/*
// @run-at document-start
@hermesthecat
hermesthecat / updateEncoding.sh
Created March 12, 2022 16:52 — forked from gokaybiz/updateEncoding.sh
Change encodings of old windows files to utf-8 without unreadable characters. This will be day saver for old subtitles. windows-1254 => Turkish Windows Encoding
$ find . -name '*.txt' -exec iconv --verbose -f windows-1254 -t utf-8 -o {} {} \;
$ find . -name '*.srt' -exec iconv --verbose -f windows-1254 -t utf-8 -o {} {} \;
@hermesthecat
hermesthecat / IsPortActive.ps1
Created March 9, 2022 12:17 — forked from asheroto/IsPortActive.md
Check if a port is active/open/listening in PowerShell.
# Copy and paste the below function into PowerShell, then you can check if a port is active/open/listening by typing:
# IsPortActive -Port 22
function IsPortActive() {
[CmdletBinding()]
param (
[Int32]$Port
)
# Check script elevation
@hermesthecat
hermesthecat / webSocketMyZAP.html
Created January 26, 2022 19:30 — forked from jhowbhz/webSocketMyZAP.html
Como utilizar MyZAP com Web Sockets
<!DOCTYPE html>
<!-- Antes de utilizar esses codigos, verifique as informações em https://apibrasil.com.br -->
<html lang="pt_BR">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Chat Demo MyZAP / apigratis.com.br</title>
</head>
@hermesthecat
hermesthecat / recaptcha-exchange-2016.md
Created January 10, 2022 12:06 — forked from msenturk/recaptcha-exchange-2016.md
recaptcha-exchange-2016.md

Integrate reCAPTCHA Validation to Exchange 2016 Outlook - OWA

We need to create an XMLHTTPRequest requester (using JavaScript) to POST the user input to Google. The first problem I encountered was that XMLHTTPRequest refuses to POST data to a different site other than the one you’ve loaded the current page from. This, apparently, is thanks to a security policy called the Same Origin Policy. This means we need to create an additional page on our own server to act as a proxy, and do the POSTing for us. This extra page returns a success or fail code to the FBA page, telling it whether to proceed with the logon, or not. It turns out that this has the added benefit of us not having to put our private key in the source for the FBA page (which would make it no longer really private).

  • Get a Public key and a Private key for your web site here.