Skip to content

Instantly share code, notes, and snippets.

@Heipry
Heipry / atajos-VSCode.md
Last active April 16, 2024 20:18
Atajos globales y personalizados de VSCode para teclado uk y es

Vscode Atajos

  • Mover linea - Alt + ↑ / ↓
  • Copiar linea - Shift + Alt + ↑ / ↓
  • Seleccionar siguiente aparición - Ctrl + D
  • Seleccionar todas las apariciones - Ctrl + Shift + L
  • Crear múltiples cursores - Ctrl + Alt+ ↑ / ↓
  • Selección multiple - Alt + Click
  • Mover bloque - Seleccionar . Alt + ↑ / ↓
  • Copiar bloque - Seleccionar . Shift + Alt + ↑ / ↓
@romuald
romuald / processlist.sql
Last active April 16, 2024 20:15
Show PostgreSQL current (running) process list;
SELECT user, pid, client_addr, waiting, query, query_start, NOW() - query_start AS elapsed
FROM pg_stat_activity
WHERE query != '<IDLE>'
-- AND EXTRACT(EPOCH FROM (NOW() - query_start)) > 1
ORDER BY elapsed DESC;
@amunchet
amunchet / noVNCCopyPasteProxmox.user.js
Last active April 16, 2024 20:12
Copy/Paste for noVNC Proxmox
// ==UserScript==
// @name noVNC Paste for Proxmox
// @namespace http://tampermonkey.net/
// @version 0.2a
// @description Pastes text into a noVNC window (for use with Proxmox specifically)
// @author Chester Enright
// @match https://*
// @include /^.*novnc.*/
// @require http://code.jquery.com/jquery-3.3.1.min.js
// @grant none
@joepie91
joepie91 / vpn.md
Last active April 16, 2024 20:11
Don't use VPN services.

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

  • A Russian translation of this article can be found here, contributed by Timur Demin.
  • A Turkish translation can be found here, contributed by agyild.
  • There's also this article about VPN services, which is honestly better written (and has more cat pictures!) than my article.
@mabenson00
mabenson00 / cheatsheet.rb
Last active April 16, 2024 20:10
Rails ActiveRecord JSON cheatsheet
# Basic key operators to query the JSON objects :
# #> : Get the JSON object at that path (if you need to do something fancy)
# -> : Get the JSON object at that path (if you don't)
# ->> : Get the JSON object at that path as text
# {obj, n} : Get the nth item in that object
# https://www.postgresql.org/docs/9.4/functions-json.html#FUNCTIONS-JSONB-OP-TABLE
# Date
# date before today
@kvnxiao
kvnxiao / awesome-selfhosted-sorted-by-stars.md
Last active April 16, 2024 20:08
awesome-selfhosted-sorted-by-stars.md

Awesome-Selfhosted

Awesome

Selfhosting is the process of locally hosting and managing applications instead of renting from SaaS providers.

This is a list of Free Software network services and web applications which can be hosted locally. Non-Free software is listed on the Non-Free page.

See Contributing.

# IDA (disassembler) and Hex-Rays (decompiler) plugin for Apple AMX
#
# WIP research. (This was edited to add more info after someone posted it to
# Hacker News. Click "Revisions" to see full changes.)
#
# Copyright (c) 2020 dougallj
# Based on Python port of VMX intrinsics plugin:
# Copyright (c) 2019 w4kfu - Synacktiv
@danielpunkass
danielpunkass / RSDimensionHuggingTextField.swift
Last active April 16, 2024 20:03
NSTextField subclasses that grow/shrink their width or height to fit text content
//
// RSDimensionHuggingTextField.swift
// RSUIKit
//
// Created by Daniel Jalkut on 6/13/18.
//
import Cocoa
// You probably want to use one of RSHeightHuggingTextField or RSWidthHuggingTextField, below
@coltenkrauter
coltenkrauter / fix-wsl2-dns-resolution
Last active April 16, 2024 20:01
Fix DNS resolution in WSL2
More recent resolution:
1. cd ~/../../etc (go to etc folder in WSL).
2. echo "[network]" | sudo tee wsl.conf (Create wsl.conf file and add the first line).
3. echo "generateResolvConf = false" | sudo tee -a wsl.conf (Append wsl.conf the next line).
4. wsl --terminate Debian (Terminate WSL in Windows cmd, in case is Ubuntu not Debian).
5. cd ~/../../etc (go to etc folder in WSL).
6. sudo rm -Rf resolv.conf (Delete the resolv.conf file).
7. In windows cmd, ps or terminal with the vpn connected do: Get-NetIPInterface or ipconfig /all for get the dns primary and
secondary.
@Lexizz7
Lexizz7 / settings.json
Last active April 16, 2024 20:00
VSCode Settings + Minimalist interface (Windows)
// Requirements:
// 1. Must install APC extension (drcika.apc-extension)
// 2. Change the font family or install JetBrainsMono Nerd Font (https://www.nerdfonts.com/font-downloads)
// 3. Change the color theme or install Catppuccin Mocha (Catppuccin.catppuccin-vsc)
// 3.1. If you changed the color theme, also change the color of the window controls to match the theme (Line 101 of this gist)
// 4. Change the icon theme or install Symbols (miguelsolorio.symbols)
// 5. Change/add your specific settings whatever you like
// ⚠ Made for Windows so idk how its gonna look on Mac
{
// General