Skip to content

Instantly share code, notes, and snippets.

@varvaruc
varvaruc / x.json
Created March 15, 2023 16:39
partnerInfoSearch response
{
"partnerInfo": [
{
"deviceType": [
"androidPhone",
"androidTablet",
"iPad",
"iPhone",
"webPlayer",
"stb",
@varvaruc
varvaruc / log4j2.xml
Created October 26, 2022 15:10 — forked from bmaupin/log4j2.xml
Log4j2.xml for Tomcat
<?xml version="1.0" encoding="utf-8"?>
<Configuration status="info">
<Properties>
<Property name="logdir">${sys:catalina.base}/logs</Property>
<Property name="layout">%d [%t] %-5p %c- %m%n</Property>
</Properties>
<Appenders>
<Console name="CONSOLE" target="SYSTEM_OUT">
<PatternLayout pattern="${layout}"/>
</Console>
@varvaruc
varvaruc / docker-cheat-sheat.md
Created April 20, 2022 07:19 — forked from andredurao/docker-cheat-sheat.md
Docker Cheat Sheet

Build docker image

$ cd /path/to/Dockerfile
$ sudo docker build .

View running processes

@varvaruc
varvaruc / IPTV-big-list.m3u
Created July 12, 2021 09:03 — forked from jonathanhammond/IPTV-big-list.m3u
IPTV big list.m3u
#EXTM3U
#EXTINF:0 tvg-name="Newsmax TV" tvg-language="English" tvg-country="CA" tvg-id="Newsmax-TV" tvg-logo="https://i.imgur.com/Twkovic.gif" group-title="Entertainment",Newsmax TV
https://nmxlive.akamaized.net/hls/live/529965/Live_1/index.m3u8
#EXTINF:0 tvg-logo="https://i.imgur.com/ODIWC6n.jpg" tvg-name="Infowars1" tvg-id="Infowars1" group-title="News",Infowars Live1
https://infostream.secure.footprint.net/hls-live/infostream-infostream/_definst_/master.m3u8
#EXTINF:0 tvg-logo="https://i.imgur.com/ODIWC6n.jpg" tvg-name="Infowars" tvg-id="Infowars" group-title="News",Infowars Live 2
https://infowarslive-lh.akamaihd.net/i/infowarsevent_1@366809/master.m3u8
#EXTINF:0 tvg-name="Russia today News" tvg-country="RU" tvg-language="English" tvg-logo="https://i.imgur.com/QY4B8Hg.png" group-title="News",RT News
https://rt-news-gd.secure2.footprint.net/1103.m3u8
#EXTINF:0 tvg-name="Russia today USA" tvg-country="RU" tvg-language="English" tvg-logo="https://i.imgur.com/QY4B8Hg.png" group-title="News",RT USA
@varvaruc
varvaruc / Regpx.h
Created April 22, 2020 10:09 — forked from Solution/Regpx.h
My C version of preg_match()
/*
* File: Regxp.h
* Author: solution
*
* Created on 11. listopad 2011, 16:00
*/
#include <stdio.h>
#include <string.h>
#include <pcre.h>
@varvaruc
varvaruc / _readme.txt
Created April 3, 2020 14:11 — forked from jcward/_readme.txt
A Perl-regex based copy script, derived from the rename script
I really like the regex syntax of the rename perl script, e.g.:
rename "s/OldFile/NewFile/" OldFile*
I simply wanted the same thing with a copy command:
copy "s/OldFile/NewFile/" OldFile*
So here it is!

Screen Quick Reference

Basic

Description Command
Start a new session with session name screen -S <session_name>
List running sessions / screens screen -ls
Attach to a running session screen -x
Attach to a running session with name screen -r <session_name>
echo "Key bindings:"
echo "A -> LEFT S -> DOWN D -> RIGHT W -> UP Q - BACK E - SELECT P - POWER ON\\OFF H -> HOME"
while :
do
read -t 1 -n 1 key
if [[ $key = a ]]
then
echo "Pressed LEFT\n"
@varvaruc
varvaruc / Webcam-Motion-setup-ubuntu.md
Last active March 14, 2020 08:33 — forked from endolith/readme.md
How to stream a webcam to a web browser in Ubuntu

Grr this took hours to figure out. I was trying to install MJPG-streamer and running VLC command lines and all this crap but nothing worked.

First install motion:

~> sudo apt-get install motion

Then create a config file:

~> mkdir ~/.motion

~> nano ~/.motion/motion.conf

#!/usr/bin/env python
#
# Copyright 2014-2015 Cameron Hart <cam@bitshifter.net.nz>.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.