Skip to content

Instantly share code, notes, and snippets.

View smaugfm's full-sized avatar

Dmytro Marchuk smaugfm

View GitHub Profile
@smaugfm
smaugfm / css-selectors.md
Created August 14, 2016 20:26
CSS-selectors

CSS-селекторы

Синтаксис

selector = simple-selector (combinator simple-selector)*
simple-selector = (type | universal) (attribute | class | ID | pseudo-class | pseudo-elemenet)*
combinator = whitespace | > | + | ~

Селектор представляет собой правило которое описывает на какие элементы документа применить стиль соответствующий селектору.

set noautofocus
set smoothscroll
let mapleader = ","
let scrollduration = 300
map yy yankDocumentUrl
map : openCommandBar
map / openSearchBar
map . repeatCommand
/*
* Copyright 2014 Google Inc. All rights reserved.
*
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
@smaugfm
smaugfm / no-distraction-youtube.txt
Created May 26, 2024 08:50
No distraction YouTube (based on Focus-for-Youtube)
[Adblock Plus 3.6]
! Title: Focus for YouTube
! Version: 2021v2.1
! Expires: 14 days
! Description: This list removes almost all distractions on YouTube
! This list is based on DandelionSprout Even More Pure Video Experience filter list https://github.com/DandelionSprout/adfilt/blob/master/YouTubeEvenMorePureVideoExperience.txt
! Homepage: https://github.com/hadig/Focus-for-Youtube
! Removes Home Page feed
youtube.com##ytd-browse[page-subtype*='home']
{
"master_record": {
"recordName": "AcA9iAhnwHPE3Tjpl2HNF2FD9MnF",
"recordType": "CPLMaster",
"fields": {
"resVidSmallHeight": {
"value": 360,
"type": "INT64"
},
"itemType": {
{
"master_record": {
"recordName": "AYersSDV0VsnH4QP/qksVStHAtNK",
"recordType": "CPLMaster",
"fields": {
"itemType": {
"value": "public.heic",
"type": "STRING"
},
"resJPEGThumbFingerprint": {
@smaugfm
smaugfm / gist:cb017b23087dfb44a69cf16766cd8191
Last active June 22, 2024 10:24
Download and run latest NVIDIA Ubuntu-x64 driver for 10xx series cards
#!/bin/bash
tmpfile=$(mktemp /tmp/abc-script.XXXXXX)
echo "#!/usr/bin/expect" >> $tmpfile
echo "set timeout 3" >> $tmpfile
echo "spawn curl https://www.nvidia.com/download/processFind.aspx?psid=101&pfid=859&osid=12&lid=1&whql=1&lang=en-us&ctk=0&qnfslb=01" >> $tmpfile
echo "expect {" >> $tmpfile
echo "\"</tr>\" { exp_continue }" >> $tmpfile
echo "\"</tr>\" { send \"\\r\" }" >> $tmpfile
echo "}" >> $tmpfile