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
<!DOCTYPE html>
<html>
<head>
<title>Nginx Photo Viewer</title>
<style>
ul {
padding-left: 0;
display: flex;
flex-wrap: wrap;
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
affinity-publisher
all-in-one-messenger
android-studio
augeas
awscli
bash
brotli
c-ares
ca-certificates
certbot
Africa/Abidjan: Wednesday, September 29, 2021 - 19:35 +0000
Africa/Accra: Wednesday, September 29, 2021 - 19:35 +0000
Africa/Addis Ababa: Wednesday, September 29, 2021 - 22:35 +0300
Africa/Algiers: Wednesday, September 29, 2021 - 20:35 +0100
Africa/Asmara: Wednesday, September 29, 2021 - 22:35 +0300
Africa/Bamako: Wednesday, September 29, 2021 - 19:35 +0000
Africa/Bangui: Wednesday, September 29, 2021 - 20:35 +0100
Africa/Banjul: Wednesday, September 29, 2021 - 19:35 +0000
Africa/Bissau: Wednesday, September 29, 2021 - 19:35 +0000
Africa/Blantyre: Wednesday, September 29, 2021 - 21:35 +0200
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kissarat
kissarat / validate-brackets.js
Last active October 29, 2021 06:52
Validates nested brackets
const closing = {
')': '(',
']': '[',
'>': '<'
};
const openBrackets = Object.values(closing)
function verify(str) {
const bracketsCount = []
for (let i = 0; i < str.length; i++) {
@kissarat
kissarat / watch.webpack.js
Created August 20, 2021 20:18
Webpack plugin to reload UI when something changed
// Webpack plugin to reload UI when something changed
const http = require('http')
const requests = []
function Watch() {
this.serve()
}
#!/usr/bin/env bash
# Report about lines of code in subdirectories
current=$(pwd)
target=$1
test -z $target && target=.
cd $target
target=$(pwd)
cd $current
// import { EventEmitter } from "common.partover/src/emitter"
const reduce = (items = [], reducer = (item, i) => ({ number: i, ...item }), initial = {}) => items.reduce((acc, { name, ...item }, i) => {
acc[name] = reducer(item, i, name)
return acc
}, initial)
const produce = (object, getKeys = Object.keys(object)) => getKeys(object).map(name => ({
name,
...object[name]
/**
* Converts the given form URL into a JSON object.
*/
function main(url = '') {
let form = url
? FormApp.openByUrl(url)
: FormApp.getActiveForm();
let items = form.getItems();