Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Dmytrii Lysak

🎯
Focusing
View GitHub Profile
@Lysak
Lysak / Setting up a new Git Repo.md
Last active Sep 24, 2022
Setting up a new Git Repo
View Setting up a new Git Repo.md

Setting up a new Git Repo

…or create a new repository on the command line

echo "# <reponame>" >> README.md
git init
gitmyname
git add README.md

git commit -m "first commit"

@Lysak
Lysak / array_diff_multidimensional.php
Created Apr 30, 2022
array_diff_multidimensional
View array_diff_multidimensional.php
function array_diff_multidimensional($arr1, $arr2): array
{
$check = is_array($arr1) && count($arr1) > 0;
$result = ($check) ? ((is_array($arr2) && count($arr2) > 0) ? $arr2 : []) : [];
if ($check) {
foreach ($arr1 as $key => $value) {
if (isset($result[$key])) {
$result[$key] = array_diff($value, $result[$key]);
} else {
$result[$key] = $value;
@Lysak
Lysak / automatically_add_cookie_param_to_selected_sites.user.js
Last active Aug 31, 2022
automatically_add_cookie_param_to_selected_sites.user.js
View automatically_add_cookie_param_to_selected_sites.user.js
@Lysak
Lysak / automatically_enable_filter_just_my_tasks_in_asana_project.user.js
Last active Nov 29, 2022
Automatically enable filter "Just my tasks" in Asana project
View automatically_enable_filter_just_my_tasks_in_asana_project.user.js
// ==UserScript==
// @name Automatically enable filter "Just my tasks" in Asana project
// @namespace https://github.com/Lysak
// @version 0.1.5
// @description Automatically enable filter "Just my tasks" in Asana project (Code License: MIT License)
// @author Dmytrii Lysak @Lysak
// @match https://app.asana.com/*
// @icon https://www.google.com/s2/favicons?domain=asana.com
// @grant none
// @noframes
@Lysak
Lysak / country.sql
Created Jun 28, 2021 — forked from ianare/country.sql
Import countries to PostgreSQL from geonames data
View country.sql
DROP TABLE "country";
CREATE TABLE "country" (
"iso" character(2) NOT NULL,
"iso3" character(3) NOT NULL,
"iso_numeric" character(3) NOT NULL,
"fips" character(2),
"name" character varying(128) NOT NULL,
"capital" character varying(128),
"area" float,
@Lysak
Lysak / TestController.php
Last active Jan 15, 2021
yii2 command for grab and parse html
View TestController.php
<?php
namespace app\commands;
use app\components\CurlClient;
use app\components\UtilsManager;
use DOMDocument;
use Exception;
use yii\console\Controller;
View .gnomerc
xinput set-prop "AlpsPS/2 ALPS DualPoint TouchPad" "Device Enabled" 0
xinput set-prop "AlpsPS/2 ALPS DualPoint Stick" "Device Enabled" 0
@Lysak
Lysak / generate-ssh-key.sh
Created Mar 23, 2020 — forked from grenade/01-generate-ed25519-ssh-key.sh
Correct file permissions for ssh keys and config.
View generate-ssh-key.sh
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/id_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/github_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/mozilla_rsa
@Lysak
Lysak / README.md
Last active Sep 27, 2019 — forked from gbraad/README.md
Buy me a coffee
We couldn’t find that file to show.
@Lysak
Lysak / contacts.js
Last active Nov 24, 2019
contacts.js
View contacts.js
contacts = {
linkedin : 'https://linkedin.com/in/dmytrii-lysak',
email : 'dlysak@live.com',
website : 'https://lysak.github.io',
};