Skip to content

Instantly share code, notes, and snippets.

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

Arturs Jansons iegik

🏠
Working from home
View GitHub Profile
@iegik
iegik / fix-permissions.sh
Last active January 26, 2021 21:41
Bash scripts
#!/bin/bash
# Fix permissions
sudo chown $USER:$GROUP -R ~/.npm/$1 ~/.bower_components/$1 ~/.node_modules/$1 bower_components/$1 node_modules/$1 build vendor
@iegik
iegik / README.md
Last active December 8, 2023 09:02

Date/Time

const date = new Date(Date.UTC(2020, 11, 20, 3, 23, 16, 738));
// Results below assume UTC timezone - your results may vary

// Specify default date formatting for language (locale)
console.log(new Intl.DateTimeFormat('en-US').format(date));
// expected output: "12/20/2020"
 
@iegik
iegik / dict.json
Last active October 26, 2021 17:02
Plural forms
{
"ru": {
"day": "день",
"%s days": ["%s день", "%s дня", "%s дней"]
}
}
@iegik
iegik / PROXY.md
Last active October 28, 2023 16:18
- Toggle proxy switch on/off on Gnome

Logging proxy

brew install mitmproxy
mitmdump -p 9000 -P https://my.server.net -w traffic.log
@iegik
iegik / correct-screen-resolution-pantheon-greeter
Created July 14, 2016 10:43
Pantheon-greeter login screen has incorrect resolution on external monitor
#!/bin/bash
# /usr/local/bin/correct-screen-resolution-pantheon-greeter
# http://elementaryos.stackexchange.com/questions/2181/pantheon-greeter-login-screen-has-incorrect-resolution-on-external-monitor
primary=eDP1
secondary=HDMI1
secondary_resolution=1920x1080
LG="$(xrandr -q | grep $secondary' connected' | awk '{ print $1 }')"
if [ "$LG" = $secondary ]; then
xrandr --output $primary --off
@iegik
iegik / .commitlintrc
Last active February 19, 2025 09:28
Git configuration and aliases
{
"extends": [
"@commitlint/config-conventional"
],
"parserOpts": {
"headerPattern": "/^(\\w*)\\((\\w*)\\): (\\w*)\\s(.*)$/",
"headerCorrespondence": [
"type",
"scope",
"ticket",
{
"brackets-file-tree-exclude.excludeList": [
"/.git/",
"/bower_components/",
"/node_modules/"
],
"interactive-linter.javascript": [
"eslint"
]
}
@iegik
iegik / .editorconfig
Last active September 28, 2022 07:48
EditorConfig
root = true
[*]
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
end_of_line = true
@iegik
iegik / .eslintrc
Last active September 28, 2022 08:15
ESLint
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": ["react", "react-native", "import"],
"extends": [
"eslint:recommended",
"plugin:import/recommended",
"plugin:react-native/all",
"plugin:prettier/recommended"
],