Skip to content

Instantly share code, notes, and snippets.

@ilwsm
ilwsm / kp.js
Last active July 26, 2026 21:20
kp
(function () {
'use strict';
function startsWith(str, searchString) {
return str.lastIndexOf(searchString, 0) === 0;
}
function endsWith(str, searchString) {
var start = str.length - searchString.length;
if (start < 0) return false;
[
{
"hostname": "localhost2",
"port": 8080,
"credential": [
{
"username": "Username",
"password": "password"
},
{
https://1drv.ms/u/s!AiIr0bOIHtslySf2yWGCFj7jnoZK?e=5rfacy
package executor.service.utl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class ErrorHandler {
private static final Logger LOGGER = LoggerFactory.getLogger(ErrorHandler.class);
public static Logger getLogger() {
return LOGGER;
}
@ilwsm
ilwsm / Main.java
Created February 2, 2023 13:45
unique_in_order
package com.company;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class Main {
public static void main(String[] args) {
String order1 = "AAAABBBCCDAABBB";
@ilwsm
ilwsm / shared.md
Last active September 1, 2022 11:18
Info

starting F:\Run\Internet\Download Master\Application Data\ffmpeg.exe -y -hide_banner -i J:\Video\ShadowPlay\Dragon Age Inquisition\tmp\пищда.mp4 -ss 74.0 -t 117.0 -c copy J:\Video\ShadowPlay\Dragon Age Inquisition\tmp\пищда (00-01-14 - 00-03-11).mp4

{
"version": 1,
"plugins": [
{
"description": "<p>Online TV - (Fix) is M3U/XML playlist loader and collection of online tv sources.<p>For more information visit corresponding websites.",
"type": "ecmascript",
"apiversion": 2,
"homepage": "https://github.com/lprot/movian-plugin-onlinetv",
"id": "tv",
"file": "tv.js",
@ilwsm
ilwsm / way.sh
Last active June 6, 2021 09:28
Configure WSL2 network inerfaces
# in sudo visudo
username ALL=(ALL:ALL) NOPASSWD: /usr/sbin/ip
# in ~/.bashrc
# 192.168.1.10 - my gateway
# 192.168.1.199 - my WSL2 static ip
EXIST=`ip ro show default via 192.168.1.10 dev eth0 | wc -l`
if ! [ $EXIST -eq 1 ]
then
buildscript {
repositories {
mavenCentral()
maven {
url "https://oss.sonatype.org/content/repositories/snapshots/"
}
maven {
url 'http://dl.bintray.com/jetbrains/intellij-plugin-service'
}
maven {
#ifndef VELO_HO_H
#define VELO_HO_H
#include <iostream>
template<typename CharType = char>
struct UTF8 {
typedef CharType Ch;
void someMethod(){
std::cout << "someMethod UTF8" << std::endl;