Skip to content

Instantly share code, notes, and snippets.

@knbr13
knbr13 / types.md
Created May 5, 2024 13:26
Data Types in Go

Data Types in Go

Go is a statically-typed language, which means that every variable has a specific data type that determines the kind of value it can hold. Go has several built-in data types that are categorized into four main groups: basic types, aggregate types, reference types, and interface types.

Basic Types

Basic types are the primitive data types in Go. They include:

  1. bool: Represents a boolean value, either true or false.
@kyo-takano
kyo-takano / making-the-most-of-local-llms.ipynb
Last active May 5, 2024 15:39
ローカルLLMはこーやって使うの💢
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sumonst21
sumonst21 / Remove YT Shorts | AdGuard.md
Created June 23, 2023 09:48
Remove YT Shorts | AdGuard

https://www.reddit.com/r/uBlockOrigin/wiki/solutions/youtube/#wiki_shorts

! YT Homepage - Hide the Shorts section
youtube.com##[is-shorts]
! YT Menu - Hide the Shorts button
www.youtube.com###guide [title="Shorts"], .ytd-mini-guide-entry-renderer[title="Shorts"]
! YT Search - Hide Shorts
www.youtube.com##ytd-search ytd-video-renderer [overlay-style="SHORTS"]:upward(ytd-video-renderer)
! YT Search and Channels - Hide the Shorts sections
www.youtube.com##ytd-reel-shelf-renderer
@vuon9
vuon9 / README.md
Last active May 5, 2024 15:39
Powertoys - Keyboard Manager - Common macOS keys mapping

How to install

  • cd C:\Users\${username}\AppData\Local\Microsoft\PowerToys\Keyboard Manager
  • Backup file existing one of default.json
  • Download default.json and add it to the current folder

Mapped keys

key
Esc
@sharbel93
sharbel93 / How to solve this problem of "! [rejected] master -> master (fetch first)"
Created January 19, 2019 10:09
How to solve this problem of "! [rejected] master -> master (fetch first)"
First Do this ...
git fetch origin master
git merge master
Then, do this ...
git fetch origin master:tmp
git rebase tmp
git push origin HEAD:master
@RakaDoank
RakaDoank / seo-meta-in-spa.md
Last active May 5, 2024 15:37
How do i achieve SEO Meta in Server While The Web Project is Single Page Application (SPA)?

Are you having a trouble about SEO Meta in server while your project is SPA only like React Router or Vue Router?

Can i guess you also don't have so much time for migration on the new framework that can handle server side rendering out of the box like Next.js, Nuxt.js, Gatsby, etc.

Setting the SEO meta in server like <title>, <meta name="description"/> are actually useful for search engine, and also good for showing your summary content in social media app by pasted the full url in Whatsapp, IG, Twitter, etc.

Enough the intermezzo, here we go.

The concept is actually simple, modify the index.html (from bundled source) before it served to the client.

@eliocapelati
eliocapelati / clube_dos_posts
Last active May 5, 2024 15:34
Clube dos posts : quickly add to flipboard
É bom estar logado no Flipboard :D
Swift, Access Control and Testing
https://share.flipboard.com/bookmarklet/popout?v=2&title=Swift%2C%20Access%20Control%20and%20Testing&url=http%3A%2F%2Fblog.diogot.com%2Fblog%2F2014%2F08%2F23%2Fswift_access_control_and_testing%2F
Introdução à Mock e Stub com Rspec
https://share.flipboard.com/bookmarklet/popout?v=2&title=Introdu%C3%A7%C3%A3o%20%C3%A0%20Mock%20e%20Stub%20com%20Rspec&url=http%3A%2F%2Foswaldoferreira.github.io%2F2014%2F08%2F29%2Fuma-abordagem-simples-sobre-mock-e-stub-em-ruby.html
Stress Testing with Loader.io
https://share.flipboard.com/bookmarklet/popout?v=2&title=Stress%20Testing%20with%20Loader.io&url=http%3A%2F%2Fwww.sitepoint.com%2Fstress-testing-loader-io%2F
@chud0
chud0 / logging.md
Last active May 5, 2024 15:34
Python logging

Модуль logging для Python.

В Python есть отличная встроенная библиотека - logging. Часто ее противопоставляют print-ам, однако на мой взгляд это гораздо более весомый инструмент. Разобравшись с некотрыми приемами в работе, хочу поделиться с сообществом наиболее, на мой взгляд, интересными вещами. Данная заметка основана на официальной документации, и по сути является частичным вольным переводом.

Когда использовать logging

Для самого простого использования, модуль предоставляет функции debug(), info(), warning(), error() и critical(). Название функций соответствует названию уровней или серьезности логируемых событий. Рекомендации по использованию стандартных уровней сведены в таблицу (в порядке возрастания серьезности).

Уровень сообщений Когда использовать
CRITICAL Критическая ошибка, выполнение программы невозможно
ERROR Из-за серьезной ошибки программа не смогла выполнить какую-либо функ
@awoimbee
awoimbee / tumbleweed_pamu2f.md
Last active May 5, 2024 15:33
OpenSuse Tumbleweed sudo via Yubikey
@LiveOverflow
LiveOverflow / forwarder.py
Created February 17, 2023 15:19
TCP Forwarder
import socket
import select
from logzero import logger
# python forwarder.py localhost:1337 ipinfo.io:80
# curl -v http://localhost.com:1337 -H "Host: ipinfo.io"
# video: https://www.youtube.com/watch?v=32KKwgF67Ho
class Forwarder: