Skip to content

Instantly share code, notes, and snippets.

@PsixokoT
PsixokoT / lepra-comments-raiting-filter.js
Created November 5, 2024 09:42
Lepra comments raiting filter
// ==UserScript==
// @name Lepra comments raiting filter
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://*.leprosorium.ru/comments/*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant none
// ==/UserScript==
@PsixokoT
PsixokoT / injectIntl.ts
Created December 20, 2018 10:02
How convert to ts
interface InjectedIntlProps {
intl: InjectedIntl;
}
interface InjectIntlConfig {
intlPropName?: string;
withRef?: boolean;
}
function injectIntl<P>(component: React.ComponentType<P & InjectedIntlProps>, options?: InjectIntlConfig):
@PsixokoT
PsixokoT / self_private.rb
Created April 16, 2018 21:04
why self private method different private setter
class Example
def initialize(name)
@name = name
end
def test_equal_private(ex)
self.private_property == ex.private_property
end
def test_equal_protected(ex)
@PsixokoT
PsixokoT / loop_1.rb
Last active January 31, 2017 11:51
native loop vs. ruby loop
def ruby_loop
yield while true
end
def native_loop_test
time = Time.now
n = 0
loop do
n = n + 1
break if Time.now - time > 5