Skip to content

Instantly share code, notes, and snippets.

View nevkontakte's full-sized avatar
👽
Pretending to be smart

Nevkontakte nevkontakte

👽
Pretending to be smart
View GitHub Profile
@nevkontakte
nevkontakte / gist:65053eaccb0e4ded71fa377667002dd8
Created December 26, 2023 21:23
TellMeWhen GCD/Cast time cursor indicator
^1^T^SStrata^SHIGH ^SPoint^T ^Sy^N9 ^SrelativeTo^STMW_CursorAnchor ^Spoint^SLEFT ^Sx^N-24 ^t^SLocked^B ^SLevel^N16 ^SGUID^STMW:group:1ayuImw3F6GM ^SColumns^N3 ^SName^SCursor ^SSettingsPerView^T ^Sicon^T ^SBorderInset^b ^t^t^SIcons^T ^N1^T ^SType^Smeta ^SIcons^T ^N1^STMW:icon:1bYq0j7=EX4q ^N2^STMW:icon:1bYq4hXCqiaa ^t^SEnabled^B ^t^N2^T ^SShowTimer^B ^SType^Scast ^SBarDisplay_BarGCD^B ^SGCDAsUnusable^B ^SOverlay_BarGCD^B ^SConditions^T ^N1^T ^SType^SCASTING ^SLevel^N1 ^t^Sn^N1 ^t^SClockGCD^B ^SBarDisplay_Invert^B ^SEnabled^B ^SEvents^T ^N1^T ^SType^SLua ^SLua^S--~`Override~`cooldown~`sweep~`texture~`to~`use~`the~`same~`texture~`as~`the~`icon.~J ~J local~`icon~`=~`...~J ~J local~`sweep~`=~`nil~J ~J for~`k,~`v~`in~`pairs(icon.Components)~`do~J ~`~`~`~`if~`v.implementationData~`~|=~`nil~`and~`v.implementationData.moduleName~`==~`"IconModule_CooldownSweep"~`then~J ~`~`~`~`~`~`~`~`sweep~`=~`v~J ~`~`~`~`~`~`~`~`break~J ~`~`~`~`end~J end~J ~J if~`not~`sweep~`then~`return~`end~J ~J sweep.cooldown:SetSwipeTexture(icon.
@nevkontakte
nevkontakte / _tests.sh
Created November 3, 2021 14:32
Run all GopherJS standard library tests
#!/bin/bash
set -e
cd "$(dirname "$0")";
# Rebuild GopherJS.
go install -v --tags gopherjsdev .;
# Set up NodeJS dependencies.
module playground/repro/008-syscall-js-modules
go 1.16
require github.com/gopherjs/gopherjs v0.0.0-20210722203344-69c5ea87048d // indirect
@nevkontakte
nevkontakte / update-go.sh
Created June 19, 2021 14:46
A little helper script to help updating Go toolchain version on Linux.
#!/bin/bash
set -e;
if [[ "$1" != "" ]]; then
VERSION="go${1}.linux-amd64"
else
VERSION="$(curl -s -S https://golang.org/VERSION?m=text).linux-amd64";
fi
<?php
/**
* Simple mutex implementation
*
* This class implements sime kind of mutex using PHP's session file lock feature.
* To be short, PHP forces serial access for processes trying wokr with the same session file.
* This is the most simple mutex imitation (flock() is a strange function with unpredictable bugs),
* but this method has some disadvantages and limitations which you should be aware of:
* 1) Using such mutexes together with native PHP sessions can cause unexpected behaviour and possible
* session DATA LOSS!
<?php
/**
* FakeBurner
* FeedBurner counter imitator / Имитатор счетчика FeedBurner
* Originally written for Zebrum Bloglike (http://zebrum.net.ru)
*
* @author Alek$ <aleks@aradmin.org.ru> http://nevkontakte.org.ru
* @copyright Alek$, 2009
* @license GNU General Public License v 2
*/
<?php
/**
* Rapid tempalte class
*
* Rapid Template is a powerful and fast template engine. Template syntax very similar to phpBB Templates and is very simple.
* Rapid Template provides full separation of design from code.
* @package RapidTemplate
* @author Alek$ <aleks@aradmin.org>
*/
# This is a higher-level Keras implementation of mountain_car_v2_tf_modernized.
#
# Algorithm: TD Advantage Actor-Critic.
#
from sklearn import preprocessing
from tensorflow import keras
from tensorflow.keras import layers
import gym # requires OpenAI gym installed
import tensorflow as tf
@nevkontakte
nevkontakte / scratchpad.txt
Last active September 23, 2020 10:54
Browser scratchpad using ACE editor (https://ace.c9.io/)
data:text/html;charset=utf-8,
<title>ScratchPad</title>
<link rel="shortcut icon" type="image/png" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAACYQAAAmEBwTBV+gAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAALVSURBVDiNpZVdSJNRHMaf993aJnvzFc9xLpXhppvIJkUGpgMjjBKCQkdRgjHQiLrpJqmwK7upW7sJIoqCAvu4tKLVTRCTSisaSAPbpg2dtZxb07mPfzcqan5s7sAD5z2c8+P5P+fjBREhXzHGCiRJemu32x/39vYyIoJARMintbe3a1Uq1XuXy2XQarVz09PT4YqKiiYxHyjnXBEMBp87HI46p9NZoFard8myrPV6vbfzKV9gjN1jjMWbm5sjQ0ND1NfX91cUxVkAD/IB9zPGEiaTacpsNlNjY2N4cHAw3dnZ+QWAYltRcM6vAziv0+l+KxQKXTKZ/ON2uxe6urreJRIJOxGlc948znkPgBvV1dWT4XC4LJVKxXw+3wwR+TQazZG5ubk4AOTkmHN+DsBNq9X6MxwOl6XT6Xm/3z9NRCHO+dElKIDsjxvnvAPAQ4PBEIjFYpWZTGZhcnJy3Gg0KqPR6D6fz/dr5fyswJzzYwCeMcb8RFRFROlEIvGDiDSFhYUNHo8nuHbNllFwzlsADEiSNAagiogoFAqN6vX64vLy8kPrQbd0zDlvBPBarVZPSJJUQ0SIxWLfbDabcXR0tCEQCHg2WruhY875bgCDSqVyGRqPx7+aTKaqYDDYuhl0Q8fFxcU2URTfKBSKmaKiIgsRIRqNftbr9bWRSOT42NjYq82g6zoWBEGw79/rUiqV87IsWxbLH7FYLLaJiYmT2UAB4L+reqaj7fK41009F51Js
@nevkontakte
nevkontakte / CLion_Ninja.md
Last active May 28, 2023 11:21
Ninja support for CLion IDE

Ninja support for CLion IDE

This script enables Ninja-powered builds in CLion IDE by wrapping around CMake, which it uses. See my blog post for details.

Disclaimer

This script is provided AS IS with no guarantees given or responsibilities taken by the author. This script relies on undocumented features of CLion IDE and may lead to instability of build and/or IDE. Use it on your own risk under WTFPL terms.