Skip to content

Instantly share code, notes, and snippets.

File 1 conents
@borissov
borissov / caps_hjkl.md
Last active May 8, 2024 01:57
Caps Lock + HJKL on Ubuntu 18.04 LTS (Bionic Beaver)

Remap systemwide Caps + HJKL to arrow keys for Ubuntu 18.04 LTS (Bionic Beaver).

For US Layout

In file /usr/share/X11/xkb/symbols/us append in xkb_symbols "basic" scope before the closing bracket:

    //hjkl
    key <AC06> {        [         h, H, Left            ]       };
    key <AC07> {        [         j, J, Down            ]       };
    key <AC08> {        [         k, K, Up              ]       };
    key <AC09> {        [         l, L, Right           ]       };
 key  { [ ISO_Level3_Shift ] }; 
@wilmeragsgh
wilmeragsgh / get_exchange_bcv.py
Last active May 8, 2024 01:55
Get value from different currencies to Venezuelan Bolivar from BCV
"""Get value from different currencies to Venezuelan Bolivar from BCV"""
import requests
from pprint import pprint
from bs4 import BeautifulSoup
# Most params
url = 'https://www.bcv.org.ve/'
exchanges_pairs_selector = {'class_': 'row recuadrotsmc'}
exchanges_date_selector = {'name': 'span', 'class_': 'date-display-single'}
@fjpalacios
fjpalacios / arch-i3gaps-install.md
Last active May 8, 2024 01:54
Arch + i3-gaps Install Guide

Arch + i3-gaps Install Guide

First set up your keyboard layout. For example, in Spanish:

   # loadkeys es

For a list of all acceptable keymaps:

   # localectl list-keymaps
@butageek
butageek / windows_activation.md
Last active May 8, 2024 01:52
Activate Windows for free

For Windows 10

Step 1 - Open PowerShell or Command Prompt as administrator

Step 2 - Install KMS client key

slmgr /ipk your_license_key

Replace your_license_key with following volumn license keys according to Windows Edition:

@karthink
karthink / fast-latex-input.el
Last active May 8, 2024 01:51
Configuration for super-fast Latex input using AucTeX, CDLatex and a bit of YaSnippet. See https://karthinks.com/software/latex-input-for-impatient-scholars
;; This elisp code uses use-package, a macro to simplify configuration. It will
;; install it if it's not available, so please edit the following code as
;; appropriate before running it.
;; Note that this file does not define any auto-expanding YaSnippets.
;; Install use-package
(package-install 'use-package)
;; AucTeX settings - almost no changes
@mikaelvesavuori
mikaelvesavuori / AuthController.ts
Created July 5, 2021 11:11
Using Lambda authorizers in Serverless Framework
import { APIGatewayProxyResult } from 'aws-lambda';
/**
* @description The controller.
*/
export async function handler(event: any): Promise<APIGatewayProxyResult> {
const clientToken = event.authorizationToken || event.headers.Authorization; // Do something with an incoming auth token
const active = true; // Do something to check if user is active or similar
@fnky
fnky / ANSI.md
Last active May 8, 2024 01:48
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
/*
A simple little editor extension to copy and paste all components
Help from http://answers.unity3d.com/questions/541045/copy-all-components-from-one-character-to-another.html
license: WTFPL (http://www.wtfpl.net/)
author: aeroson
advise: ChessMax
editor: frekons
*/
#if UNITY_EDITOR
@Refsa
Refsa / URPSimpleLit.shader
Created October 31, 2020 09:03
Unity - Shader showing how to write a Simple Lit shader for Unity URP
Shader "Custom/URPSimpleLit"
{
Properties
{
_Color ("Color", Color) = (1,0,0,1)
}
SubShader
{
Tags {
"RenderPipeline" = "UniversalPipeline"