Skip to content

Instantly share code, notes, and snippets.

View kissarat's full-sized avatar
🏠
Working from home

Taras Labiak kissarat

🏠
Working from home
View GitHub Profile
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "SurveyJS Library json schema",
"type": "object",
"properties": {
"pages": {
"type": "array",
"items": {
"$ref": "#/definitions/page"
}
function *$combine(...seq) {
for (let i = 1; i <= seq.length; i++) {
for (let j = 0; j <= seq.length - i; j++) {
yield seq.slice(j, j + i)
}
}
}
const denyAttrs = ['class', 'style', 'width', 'height', 'value', 'd', 'viewBox', 'transform']
const symbols = [];
function quantify(data) {
for(const change of data) {
if (symbols.indexOf(change.symbol) < 0) {
symbols.push(change.symbol)
symbols.sort()
// console.log(change.symbol, symbols.join('\n'))
}
}
@kissarat
kissarat / swap.sh
Last active February 4, 2019 16:11
FILENAME=/tmp/swap-$(date +%s)
dd if=/dev/zero of=${FILENAME} bs=1M count=$1
mkswap ${FILENAME}
chmod 600 ${FILENAME}
swapon ${FILENAME}
#!/usr/bin/env python3
from os import listdir, chdir, stat
from stat import *
from platform import uname, python_implementation, python_version_tuple
from os.path import abspath, basename
from sys import argv
from hashlib import md5
from base64 import b64encode
from json import dumps
from datetime import datetime
#include <iostream>
#include "opencv2/opencv.hpp"
#define brk imshow("1", m1); if (waitKey(5) >= 0) break;
using namespace cv;
using namespace std;
Mat lookup(1, 256, CV_8U);
void make_lookup(uchar k) {
uchar* p = lookup.data;
Mozilla/5.0 (Nintendo 3DS; U; ; en) Version/1.7552.EU
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; JyxoToolbar1.0; http://www.Abolimba.de; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 1.1.4322)
Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; http://www.Abolimba.de)
Mozilla/5.0 (compatible; U; ABrowse 0.6; Syllable) AppleWebKit/420+ (KHTML, like Gecko)
Mozilla/5.0 (compatible; ABrowse 0.4; Syllable)
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Acoo Browser; InfoPath.2; .NET CLR 2.0.50727; Alexa Toolbar)
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Acoo Browser; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Acoo Browser; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506)
Mozilla/5.0 (Windows NT 6.1; rv:8.0) Gecko/20111108 Firefox/8.0 Alienforce/8.0
amaya/9.52 libwww/5.4.0
@kissarat
kissarat / meta.sql
Last active December 18, 2015 00:19
MySQL database schema metainformation
-- USE mysql;
CREATE VIEW table_names AS
SELECT table_name as `name` FROM information_schema.tables
WHERE table_schema=database() AND table_type='BASE TABLE';
CREATE VIEW view_names AS
SELECT table_name as `name` FROM information_schema.tables
WHERE table_schema=database() AND table_type='SYSTEM VIEW';
@zziuni
zziuni / stuns
Created September 18, 2012 08:05
STUN server list
# source : http://code.google.com/p/natvpn/source/browse/trunk/stun_server_list
# A list of available STUN server.
stun.l.google.com:19302
stun1.l.google.com:19302
stun2.l.google.com:19302
stun3.l.google.com:19302
stun4.l.google.com:19302
stun01.sipphone.com
stun.ekiga.net