Skip to content

Instantly share code, notes, and snippets.

@plcgi1
plcgi1 / my-cv-data-ru
Created October 7, 2025 11:02
my-cv-data-ru
{
"experience":[
{
"company": "Тех Солюшнс Инк.",
"position": "Старший Full Stack Разработчик",
"period": "2020 - Настоящее время",
"description": "Руководил разработкой веб-приложений на React и Node.js. Внедрил CI/CD pipelines и улучшил производительность приложений на 40%.",
"technologies": ["React", "TypeScript", "Node.js", "PostgreSQL", "AWS"]
},
{
@plcgi1
plcgi1 / my-cv-data-en
Created October 7, 2025 11:01
my-cv-data-en
{
"experience": [
{
"company": "Tech Solutions Inc.",
"position": "Senior Full Stack Developer",
"period": "2020 - Present",
"description": "Led development of multiple web applications using React and Node.js. Implemented CI/CD pipelines and improved application performance by 40%.",
"technologies": ["React", "TypeScript", "Node.js", "PostgreSQL", "AWS"]
},
{
@plcgi1
plcgi1 / daemon.js
Created June 15, 2023 10:20 — forked from kumatch/daemon.js
Node.js daemon example
var fs = require('fs');
var INTERVAL = 1000;
var cycle_stop = false;
var daemon = false;
var timer;
process.argv.forEach(function (arg) {
if (arg === '-d') daemon = true;
@plcgi1
plcgi1 / event-emitter.js
Created October 28, 2022 06:35
event-emitter
/*
Usage:
Component 1
import EventEmitter from "../blabla/event-emitter";
import events from './events'
function TeamList( { tableContentType, count, data, loading } ) {
function handleTableChange () {
...
}
@plcgi1
plcgi1 / main.go
Created July 21, 2022 07:19 — forked from 117/main.go
Check if JSON matches a struct in Go.
package main
import (
"encoding/json"
"fmt"
"reflect"
"strings"
)
// Example - An example JSON-friendly struct.
// https://vincit.github.io/objection.js/guide/transactions.html#using-a-transaction
// https://vincit.github.io/objection.js/guide/query-examples.html#graph-inserts
const { Model } = require('objection');
const Knex = require('knex');
const config = require('../config/environment');
// Initialize knex.
const knex = Knex({
client: 'postgres',
@plcgi1
plcgi1 / ffmpeg tips
Last active June 3, 2020 16:39
ffmpeg tips
// change video framerate
ffmpeg -y -r 24 -i seeing_noaudio.mp4 seeing.mp4
// change audio sampling rate
ffmpeg -i "movie.avi" -y -ar 44100 -acodec mp3 "movie.flv"
// change framerate, audio sampling rate
ffmpeg -i ~/Videos/4K\ Video\ Downloader/sula\ 2017.mp4 -y -ar 48000 -ac 2 -r 25 -acodec mp3 ~/Videos/sula\ 2017.mp4
@plcgi1
plcgi1 / UploaderForGoogleDrive.js
Created April 22, 2020 16:56 — forked from DrPaulBrewer/UploaderForGoogleDrive.js
Upload Browser Blobs to Files in Google Drive API v3
// upload.js, from https://github.com/googledrive/cors-upload-sample
// Contributors Steve Bazyl, Mike Procopio, Jeffrey Posnick, Renaud Sauvain
// License: Apache 2.0 http://www.apache.org/licenses/LICENSE-2.0
//
// Implements Resumable Upload for Google Drive as described by
// https://developers.google.com/drive/v3/web/resumable-upload
//
// Modified by Paul Brewer, Economic and Financial Technology Consulting LLC
// Nov. 1 2017
// 1. use Google Drive API V3 instead of V2
@plcgi1
plcgi1 / psql - jsonb - search in array of object
Last active February 27, 2020 11:36
psql - jsonb - search in array of object
CREATE TABLE tbl (tbl_id int, usr jsonb);
-- for pg10
CREATE INDEX tbl_special_idx ON tbl USING gin (jsonb_arr_record_keys(jdata->'array'));
-- for pb >9.4
CREATE INDEX tbl_special_idx ON tbl USING gin (usr jsonb_path_ops);
insert into tbl(usr) VALUES('[{ "_id" : "2", "count" : "4" }, { "_id" : "3", "count": "3"}]')
insert into tbl(usr) VALUES('[{ "_id" : "2", "count" : "5" }, { "_id" : "3", "count": "36"}]')
@plcgi1
plcgi1 / postgres-initial
Created February 17, 2020 10:58
PG initial setup
1.console#> psql postgres
postgres=# ALTER USER librarian WITH SUPERUSER;
2.postgres=# CREATE USER username WITH ENCRYPTED PASSWORD 'secretpassword';
3.postgres=# CREATE database "db-name"
4.postgres=# GRANT ALL PRIVILEGES ON DATABASE "db-name" TO username;
5.console#> pg_restore latest.dump > 2018-10-06.sql
6. psql -U username < 2018-10-06.sql
# script pgdump
PGHOST=dbhost