Skip to content

Instantly share code, notes, and snippets.

import UIKit
import SwiftUI
struct MyView: View {
@State var number: Int = .zero
var body: some View {
MyViewController.SwiftUIView(number: $number)
}
}
const size_t usart1_buff_size = 256;
char usart1_buff[usart1_buff_size];
uint16_t usart1_buff_write = 0;
uint16_t usart1_buff_read = 0;
#ifdef __cplusplus
extern "C" {
#endif
void USART1_IRQHandler(void) __attribute__((interrupt("WCH-Interrupt-fast")));
void USART1_IRQHandler(void) {
@egg82
egg82 / proxmox_nvidia.md
Last active May 23, 2024 13:53
NVidia Proxmox + LXC

Proxmox

Find the proper driver at the NVidia website.

Note: Make sure to select "Linux 64-bit" as your OS

Hit the "Search" button.

Ruby: The future of frozen string literals

What is a literal?

In programming languages, literals are textual representations of values in the source code. This is a syntactical concept.

Some examples:

7 # integer literal
@bigsergey
bigsergey / review-checklist.md
Last active May 23, 2024 13:50
Front-end Code Review Checklist

Review checklist

General

  1. Does the code work?
  2. Description of the project status is included.
  3. Code is easily understand.
  4. Code is written following the coding standarts/guidelines (React in our case).
  5. Code is in sync with existing code patterns/technologies.
  6. DRY. Is the same code duplicated more than twice?
@superjamie
superjamie / install-ubuntu-luks-lvm.md
Last active May 23, 2024 13:49
How to install Ubuntu with LUKS Encryption on LVM

How to install Ubuntu with LUKS Encryption on LVM

My work requires us to have full-disk encryption, so these are the steps I use.

The basic idea is to create a LUKS-encrypted partition which is used as an LVM Physical Volume.

The GRUB boot partition isn't encrypted, but everything else is.

These steps tested and working on 22.04 (jammy) and 20.04 (focal).

@adeelibr
adeelibr / useReducerExample.js
Created November 4, 2018 12:14
React Hooks useReducer
import React, { useReducer } from 'react';
const initialState = {
loading: false,
count: 0,
};
const reducer = (state, action) => {
switch (action.type) {
case 'increment': {
@bftanase
bftanase / secure_link.php
Last active May 23, 2024 13:47
generate URL for nginx secure_link
@p01
p01 / LICENSE.txt
Last active May 23, 2024 13:46 — forked from 140bytes/LICENSE.txt
Sudoku Solver in 140bytes
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Mathieu 'p01' Henri - http://www.p01.org/releases/
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@kcwhite
kcwhite / wordle_possibles.txt
Last active May 23, 2024 13:44
List of valid Wordle guess words pulled directly from the NY Times website. Only a subset of these are actual Wordle solutions.
aahed
aalii
aargh
aarti
abaca
abaci
abacs
abaft
abaka
abamp