Skip to content

Instantly share code, notes, and snippets.

View Yanrishatum's full-sized avatar
💭
Set your status

Pavel Alexandrov Yanrishatum

💭
Set your status
  • Russian Federation Sarov
View GitHub Profile
@Yanrishatum
Yanrishatum / OAL.hx
Created June 19, 2016 16:53
Streaming audio fast implementation
package utils.system;
import haxe.io.BytesData;
import lime.audio.openal.AL;
import lime.utils.UInt16Array;
//import openal.AL;
import lime.utils.UInt8Array;
import ogg.Ogg;
import openfl.Assets;
import openfl.utils.ByteArray;
import utils.system.OAL.StreamingAudio;
@Yanrishatum
Yanrishatum / simpleWordWrap.js
Created May 5, 2017 05:07
Simple WordWrap sample for Miaut
function wordWrap(text, width, spaceSize)
{
var lines = text.split("\n"); // In case input have newlines, we want to preserve them.
var output = [];
for (var line of lines)
{
var newLine = "";
var words = line.split(" ");
var lineSize = 0;
for (var word of words)
@Yanrishatum
Yanrishatum / PJChatterbox.user.js
Created May 29, 2017 19:34
PixelJoint chatterbox autoupdater.
// ==UserScript==
// @name Chatterbox refresher
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Makes chatterbox more of a chat than small forum page.
// @author Yanrishatum
// @match http://pixeljoint.com/pixels/chatterbox.asp
// @match http://pixeljoint.com/pixels/chatterbox.asp*
// @updateURL http://yanrishatum.ru/pj/scripts/PJChatterbox.user.js
// @grant GM_getValue
@Yanrishatum
Yanrishatum / BRSwapShader.hx
Created January 6, 2018 17:10
FD Bug for override completion, unstable, sample.
package graphics.shaders;
import openfl.display.Shader;
/**
* ...
* @author
*/
class BRSwapShader extends Shader
{
@Yanrishatum
Yanrishatum / rules.txt
Last active January 27, 2018 16:44
Stay awhile and listen
Добро пожаловать в музыкальный канал. Правила просты - постим годную музыку, общаемся на тему музыки, но постим больше.
И не обсирайте вкусы других, будьте добры, мы люди цивилизованные и понимаем что у всех разные предпочтения. :)
Welcome to the music channel. Rules are simple - post good music, talk about music, but post music more.
And please don't criticize other people tastes. We are civilized people and understand that everyone have their own preferences. :)
Stay awhile, and listen!
Invite link: https://t.me/joinchat/Dd0c5RLqVmkOz8ToSrdh1A
@Yanrishatum
Yanrishatum / darkdeck.user.js
Created February 7, 2018 00:10
Dark tweetdeck that is not shitty blue.
// ==UserScript==
// @name Darkdeck
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Tweetdeck blue itself.
// @author Yanrishatum
// @match https://tweetdeck.twitter.com/
// @grant none
// ==/UserScript==
// ==UserScript==
// @name Actually fixed reddit UI
// @namespace http://yanrishatum.ru/
// @version 0.2
// @description For fucks sake, it's PC, we don't need that much negative space and nags.
// @author Yanrishatum
// @match *://reddit.com/*
// @match *://*.reddit.com/*
// @grant none
// ==/UserScript==
var what = requestArgument("Haxe or Hashlink? [HAXE/hl]: ");
if (what.toLowerCase() != "hl") what = "haxe";
else what = "hl";
var currFile = "haxe_ver/." + what + "_current";
var dir = sys.FileSystem.readDirectory("haxe_ver");
var current = sys.FileSystem.exists(currFile) ? sys.io.File.getContent(currFile) : "";
var versions = [];
@Yanrishatum
Yanrishatum / compile_hlc.bat
Created August 4, 2018 01:06
HashLink: HLC compiler for windows.
@echo OFF
REM Somewhat stable hlc compiler.
REM Usage notes:
REM %HASHLINK% should point to hl/include folder
REM %HASHLINK_BIN% should point to hl folder
REM vcvarsall.bat should be available in path OR cl.exe should be available beforehand.
REM Use -h for instructions
set srcPath=.
set mainCl=main.c
@Yanrishatum
Yanrishatum / SpriteToSheet.jsx
Created September 22, 2018 23:45
Sprite2Sheet script
// This script exports animated sprite into a spritesheet to a document copy.
// Made by: Yanrishatum <yanrishatum@gmail.com> | http://yanrishatum.ru
// Script version: 1.1.0
// 08.02.2016: Initial release.
// 10.02.2016: Added options.
//
// License info:
// This is free and unencumbered software released into the public domain.
//
// Anyone is free to copy, modify, publish, use, compile, sell, or