Skip to content

Instantly share code, notes, and snippets.

View tompazourek's full-sized avatar
👨‍💻
Busy

Tom Pažourek tompazourek

👨‍💻
Busy
View GitHub Profile
@OdatNurd
OdatNurd / log_file_tail.py
Created August 22, 2023 04:54
Sublime Text 4 plugin that will cause reloaded log files to jump to the bottom of the file on new content
import sublime
import sublime_plugin
from fnmatch import fnmatch
# Related Reading:
# https://forum.sublimetext.com/t/auto-scroll-to-bottom-tail-log-files/69156
#
# For any opened file that matches one of the globs set out below, this will
# cause the view of the file to jump to the bottom whenever the file reloads
@tinogomes
tinogomes / DNS_TO_LOCALHOST.markdown
Last active April 15, 2024 07:22
Public DNS Pointing to localhost (127.0.0.1)

Available Public Wildcard DNS Domains pointing to localhost (127.0.0.1)

The best way to safely and securely use local domains pointing to 127.0.0.1 is to edit your local settings (/etc/hosts) and add your own settings. Keep in mind if you want to use subdomains, you need to enter all variations.

Example:

# Adding bottom of your current file /etc/hosts
################# MY LOCAL DOMAINS
127.0.0.1 local.com admin.local.com
127.0.0.1 domain1.com
@alekseykulikov
alekseykulikov / index.md
Last active April 14, 2024 00:32
Principles we use to write CSS for modern browsers

Recently CSS has got a lot of negativity. But I would like to defend it and show, that with good naming convention CSS works pretty well.

My 3 developers team has just developed React.js application with 7668 lines of CSS (and just 2 !important). During one year of development we had 0 issues with CSS. No refactoring typos, no style leaks, no performance problems, possibly, it is the most stable part of our application.

Here are main principles we use to write CSS for modern (IE11+) browsers:

@jonathantneal
jonathantneal / html.css
Created April 28, 2016 23:55
Microsoft Edge User Agent Stylesheet
/*! Microsoft EdgeHTML 13.10586 | Copyright (C) Microsoft. All rights reserved. */
address {
display: block;
font-style: italic;
}
article {
display: block;
unicode-bidi: embed;
@bishboria
bishboria / springer-free-maths-books.md
Last active April 25, 2024 06:27
Springer made a bunch of books available for free, these were the direct links
buttonHTML = """<button type="button" class="attach" data-action="x-attach">Attach Files</button>"""
fileInputHTML = """<input type="file" multiple>"""
$(Trix.config.toolbar.content).find(".button_group.block_tools").append(buttonHTML)
$(document).on "trix-action-invoke", ($event) ->
if $event.originalEvent.actionName is "x-attach"
editorElement = $event.target
editorElement.focus()
@paulirish
paulirish / what-forces-layout.md
Last active April 25, 2024 21:49
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@bobbygrace
bobbygrace / trello-css-guide.md
Last active April 22, 2024 10:15
Trello CSS Guide

Hello, visitors! If you want an updated version of this styleguide in repo form with tons of real-life examples… check out Trellisheets! https://github.com/trello/trellisheets


Trello CSS Guide

“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”

You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?

@ericelliott
ericelliott / essential-javascript-links.md
Last active April 22, 2024 10:15
Essential JavaScript Links
@carols10cents
carols10cents / c#-to-rust.md
Last active April 18, 2024 22:55
C# to Rust Cheat Sheet

Thanks to @seejee for making this for me!!!

C# to Rust Cheat Sheet

The goal of this is to have an easily-scannable reference for the most common syntax idioms in C# and Rust so that programmers most comfortable with C# can quickly get through the syntax differences and feel like they could read and write basic Rust programs.

What do you think? Does this meet its goal? If not, why not?

Variables