Skip to content

Instantly share code, notes, and snippets.

View Vlasterx's full-sized avatar
🛸
Working from mothership

vlasterx Vlasterx

🛸
Working from mothership
  • Belgrade, Serbia
  • 04:04 (UTC +02:00)
View GitHub Profile
@Vlasterx
Vlasterx / YouTubeWide.css
Created May 2, 2025 12:47
Stylus configuration for wide YouTube
@-moz-document domain("youtube.com") {
@media screen and (min-width: 1900px) {
.style-scope.ytd-rich-grid-renderer {
--ytd-rich-grid-items-per-row: 6;
}
}
@media screen and (min-width: 1500px) and (max-width: 1900px) {
.style-scope.ytd-rich-grid-renderer {
--ytd-rich-grid-items-per-row: 5;
@Vlasterx
Vlasterx / Microsoft.PowerShell_profile.ps1
Created January 21, 2025 08:37
Minimal git prompt for Powershell
# Add this to Powershell profile
function prompt {
$gitBranch = & git rev-parse --abbrev-ref HEAD 2>$null
$pathString = "$PWD"
$gitString = ""
if ($gitBranch) {
$status = & git status -sb 2>$null
$aheadBehind = ""
@Vlasterx
Vlasterx / windows-ssh.md
Created November 2, 2024 13:37
Adding SSH keys to Windows SSH client

Install Open SSH client

To enable SSH functionality in Windows 11, follow these steps:

Open Settings: Press Win + I to open the Settings app.

Go to Apps: Navigate to Apps > Optional features.

Add an Optional Feature: Scroll down and click on View features under the "Add an optional feature" section.

Search for OpenSSH: In the search box, type OpenSSH and you should see two options:

@Vlasterx
Vlasterx / generate_signing_keys.md
Last active June 7, 2024 11:54
Creating signing keys for GitHub

Use GPG signing keys for GitHub


Windows only:

@Vlasterx
Vlasterx / auth.py
Created March 26, 2024 10:15
OLL Auth workaround
# Workaround for setting the redirect_uri to localhost.
# Host is set in proxy server.py and redirect_uri takes the request host value
# See https://github.com/openlawlibrary/platform/issues/4281
def get_redirect_uri(self, state=None):
"""Build redirect with redirect_state parameter."""
uri = self.redirect_uri
if self.REDIRECT_STATE and state:
uri = self.url_add_parameters(uri, {"redirect_state": state})
if settings.DEBUG:
return uri.replace('127.0.0.1', 'localhost')
@Vlasterx
Vlasterx / tree-shaking.md
Last active January 23, 2024 11:31
Note for tree shaking

Note for the tree shaking

In order to properly enable tree shaking, each main function whould be written in its own file, exported as default and then additionally exported from the index.ts.

/src/something/some-function.ts

export const someFunction = () => {}

export default someFunction
@Vlasterx
Vlasterx / picard-facepalm-ascii.md
Last active February 9, 2022 18:41 — forked from aim-up/picard-facepalm-ascii.txt
Captain Picard Facepalm ASCII
...........................................________........................
....................................,.-‘”...................``~.,..................
.............................,.-”...................................“-.,............
.........................,/...............................................”:,........
.....................,?......................................................\,.....
.................../...........................................................,}....
................./......................................................,:`^`..}....
.............../...................................................,:”........./.....
..............?.....__.........................................:`.........../.....
@Vlasterx
Vlasterx / uBlock.txt
Last active May 8, 2025 09:25
uBlock konfiguracija
! Reddit clean-up
www.reddit.com##a[href^="/rpan/"] > h3:has-text(/Top (livestream|broadcast)/):upward(7)
! Linkedin clean-up
www.linkedin.com##.feed-shared-actor__description:has-text(/Promoted/):upward(7)
www.linkedin.com##.feed-shared-text-view>span:has-text(/Add to your feed/):upward(7)
! Twitter clean-up
!twitter.com##h2>div>span:has-text(/Trends for you/):upward(10)
!twitter.com##h2>div>span:has-text(/You might like|Who to follow/):upward(5)
@Vlasterx
Vlasterx / delete-linkedin-posts.js
Last active March 12, 2025 08:33
Delete all LinkedIn posts version for June 2021.
(() => {
let speedMs = 500
setInterval(() => {
let dropdown = document.querySelector('.feed-shared-update-v2__control-menu .artdeco-dropdown button')
dropdown.click()
setTimeout(() => {
let optionDel = dropdown.parentElement.parentElement.parentElement.querySelector('.option-delete .tap-target')
@Vlasterx
Vlasterx / table2json.js
Created April 1, 2021 13:11
HTML table to JSON
/**
* Recursive function that parses table elements
*
* @param elHtml - HTML object that contains table
* @returns { Object } JSON element with parsed table
*/
const parseTable = (elHtml = null) => {
if (elHtml === null) { return false }
let elName = String(elHtml.nodeName).toLowerCase()