Skip to content

Instantly share code, notes, and snippets.

View weber's full-sized avatar

Sergey Kirichenko weber

View GitHub Profile
@weber
weber / zsh
Created March 27, 2020 13:30
GIT REBASE FLOW
#GIT REBASE FLOW
#Git Rebase Workflow
#Then, to use the Git Rebase workflow, you can try :
# Checkout the Feature branch.
# $ git checkout feature/1
# Rebase the Feature branch onto "master" the interactive way.
# $ git rebase -i master
@weber
weber / gist:a135a0ce45f6267dbac9d51d35c0adfa
Created November 21, 2019 06:25
Ошибка sudo в wsl.exe
# Ошибка/Error
$ sudo apt-get update
sudo: error in /etc/sudo.conf, line 0 while loading plugin "sudoers_policy"
sudo: /usr/lib/sudo/sudoers.so must be only be writable by owner
sudo: fatal error, unable to load plugins
# Решение/solved
# Запускаем cmd и вводим
@weber
weber / index.js
Created September 2, 2018 09:43 — forked from orther/index.js
A few simple examples of sorting with Ramda's sortBy function.
import R from 'ramda';
const items = [
{id: 1, name: 'Al', country: 'AA'},
{id: 2, name: 'Connie', country: 'BB'},
{id: 3, name: 'Doug', country: 'CC'},
{id: 4, name: 'Zen', country: 'BB'},
{id: 5, name: 'DatGGboi', country: 'AA'},
{id: 6, name: 'Connie', country: 'AA'},
];
@weber
weber / IntersectionObserver.vue.js
Last active August 24, 2023 16:25 — forked from lex111/IntersectionObserver.vue.js
Готовый IntersectionObserver.vue
export default {
// Включает абстрактный компонент во Vue.
// Это свойство не задокументировано и может измениться в любой момент,
// но ваш компонент должен работать без него.
abstract: true,
// Входные параметры отлично работают в абстрактных компонентах!
props: {
threshold: {
type: Array
@weber
weber / yellow_background_on_input
Created June 21, 2018 11:13
Remove the yellow background on input on autofill
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus
input:-webkit-autofill,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
location = location
... and a 534 other ways to reload the page with JavaScript
location = location
location = location.href
location = window.location
location = self.location
location = window.location.href
location = self.location.href
@weber
weber / Screen Rotation Toggle.applescript
Created October 26, 2017 21:31
Меняет ориентацию второго дисплей с 90° на обычную и обратно
-- 10.13 rus
on assistive_access_check()
tell application "System Events"
if not (UI elements enabled) then
return false
else
return true
end if
end tell
@weber
weber / gist:b75fa7a1d9f624d4afe8
Last active November 25, 2015 07:45
Fix media-query ipad landscape
// В ipad media-query в албомном режиме определяет свою ширину как 768px,
// хотя должно быть 1024px. Хак решающий этот баг
@media (orientation:landscape) and (min-device-height:1000px), all and (min-width:1000px) {
// css
}
@weber
weber / load script
Created September 19, 2015 16:17
load script
(function(d) {
var wf = d.createElement('script'), s = d.scripts[0];
wf.src = '/bower_components/webfontloader/webfontloader.js';
s.parentNode.insertBefore(wf, s);
})(document);
@weber
weber / gist:bebdba2255456e50d87b
Created July 17, 2015 07:25
Установка кодировки соединения nodejs mysql2
var sql1 = "SET CHARACTER SET utf8";
connection.query(sql1, function (err, result) {
var sql = "SET SESSION collation_connection ='utf8_general_ci";
connection.query(sql, function (err, result) {
});
});