Skip to content

Instantly share code, notes, and snippets.

View CertainLach's full-sized avatar

Yaroslav Bolyukin CertainLach

  • Serbia, Belgrade
  • 16:50 (UTC +02:00)
View GitHub Profile
@CertainLach
CertainLach / chunk.js
Created September 5, 2015 21:35
Precompiled prismarine-chunk and world
'use strict';
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
var BUFFER_SIZE = 16 * 16 * 16 * 16 * 3 + 256;
var _require = require('uint4');
import Logger from "./logger/Logger";
import Promise from "bluebird";
/**
* Created by Creeplays on 23.08.2016.
*/
let logger=new Logger('Queuer');
console.log('Queuer import');
export function queue(time){
return function (target, key, descriptor) {
const COLLECTION_DIR = 'путь до папки с музыкой без / в конце';
const VK_TOKEN = 'токен';
const THREADS=4;
const url = require("url");
const http = require("http");
const https = require("https");
const fs = require("fs");
let canReceive = true;

Motivation

  • To replace some methods of class on creation instead on creating addictional class

Example

class A {
  b() {
 return 3;

Keybase proof

I hereby claim:

  • I am certainlach on github.
  • I am certainlach (https://keybase.io/certainlach) on keybase.
  • I have a public key ASB6Lok-d909MbiIJj4xO6WEwTMEg6iTyJEMghXDO-BPdAo

To claim this, I am signing this object:

@CertainLach
CertainLach / benchmark.md
Last active July 10, 2022 12:00
Jrsonnet performance

Benchmark results

large_string_join

Command Mean [ms] Min [ms] Max [ms] Relative
jrsonnet large_string_join.jsonnet 16.5 ± 0.5 16.1 19.6 1.00
gojsonnet large_string_join.jsonnet 90.7 ± 3.8 85.6 104.0 5.49 ± 0.29
jsonnet large_string_join.jsonnet 69.5 ± 2.4 68.2 78.1 4.20 ± 0.20
sjsonnet large_string_join.jsonnet 760.6 ± 12.7 739.9 787.2 46.00 ± 1.67
@CertainLach
CertainLach / _.nix
Last active December 5, 2022 20:39
Khadas Vim3 nixos configuration
{...}: {
# Make UART work
boot.kernelParams = [ "console=ttyAML0,115200n8" ];
# No need to override uboot on the sdcard, it is not being used at all
# Instead upgrade it via khadas script, as default version is very old (At least on old vim's, but do it in any case),
# and can't run nixos (something with kernel image loading)
sdImage.populateFirmwareCommands = ''
cp ${./s905_autoscript.cmd} firmware/s905_autoscript.cmd
${pkgs.ubootTools}/bin/mkimage -A arm64 -O linux -T script -C none -a 0 -e 0 -n "S905 autoscript" -d ${./s905_autoscript.cmd} firmware/s905_autoscript
${pkgs.ubootTools}/bin/mkimage -A arm64 -O linux -T script -C none -a 0 -e 0 -n "S905 autoscript" -d ${./s905_autoscript.cmd} firmware/boot.scr
use core::mem::ManuallyDrop;
use core::str::from_utf8;
const SIZE_LIMIT: usize = 40;
trait Name {
const NAME: [u8; SIZE_LIMIT];
const NAME_LEN: usize;
fn name() -> &'static str {
from_utf8(&Self::NAME[..Self::NAME_LEN]).expect("bad utf-8")