Skip to content

Instantly share code, notes, and snippets.

@e7d
e7d / remove-obsolete-gpg-key-from-dnf.md
Last active May 12, 2024 15:06
Remove obsolete GPG key from DNF (Fedora)
@manualbashing
manualbashing / blog.md
Last active May 12, 2024 15:04 — forked from joncloud/pr.md
Checkout Azure DevOps Pull Requests locally

Forked from piscisaureus

Fetch and checkout one specific pull request

To identify one particular pull request, find the pull request number on the Azure DevOps site:

image

Then fetch and checkout the pull request in a local branch named pull/137

@azagniotov
azagniotov / beautiful.rest.api.docs.in.markdown.md
Last active May 12, 2024 15:03
Example to create beautiful REST API docs in Markdown, inspired by Swagger API docs.
@n1snt
n1snt / Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md
Last active May 12, 2024 15:02
Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

@sckalath
sckalath / windows_privesc
Last active May 12, 2024 15:00
Windows Privilege Escalation
// What system are we connected to?
systeminfo | findstr /B /C:"OS Name" /C:"OS Version"
// Get the hostname and username (if available)
hostname
echo %username%
// Get users
net users
net user [username]
@yasirkula
yasirkula / ScrollViewFocusFunctions.cs
Created October 23, 2021 10:09
Focus/center Scroll View to the specified point/item in Unity
using System.Collections;
using UnityEngine;
using UnityEngine.UI;
public static class ScrollViewFocusFunctions
{
public static Vector2 CalculateFocusedScrollPosition( this ScrollRect scrollView, Vector2 focusPoint )
{
Vector2 contentSize = scrollView.content.rect.size;
Vector2 viewportSize = ( (RectTransform) scrollView.content.parent ).rect.size;

Rusty's API Design Manifesto

The idea

Application Programming Interface (API) design is hard. But it's even harder to change once you get it wrong. So what you should do is to spend the effort to get it right the first time around.

In the Linux Kernel community Rusty Russell came up with a API rating scheme to help us determine if our API is sensible, or not. It's a rating from -10 to 10, where 10 is perfect is -10 is hell. Unfortunately there are too many examples at the wrong end of the scale.

Rusty's original descriptions

@codigoconjuan
codigoconjuan / db.js
Created August 22, 2023 23:18
Gist Guitarras para GuitarLA - React y TypeScipt - La Guía Completa
export const db = [
{
id: 1,
name: 'Lukather',
image: 'guitarra_01',
description: 'Morbi ornare augue nisl, vel elementum dui mollis vel. Curabitur non ex id eros fermentum hendrerit.',
price: 299,
},
{
id: 2,
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 12, 2024 14:54
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory