Skip to content

Instantly share code, notes, and snippets.

@woxtu
woxtu / ocr.js
Last active May 3, 2024 04:45 — forked from doraTeX/ocr.sh
A JavaScript (JXA) to perform OCR on images/PDFs using macOS built-in OCR engine
#!/usr/bin/osascript -l JavaScript
ObjC.import("stdlib");
ObjC.import("AppKit");
ObjC.import("PDFKit");
ObjC.import("Vision");
const scriptName = $.NSProcessInfo.processInfo.arguments.objectAtIndex(3).lastPathComponent.js;
console.error = (obj) => {

VimWiki Cheatsheet

[number] refers to the wiki number, set by the order in your vimrc. The default is 1.

Wiki Management

  • [number] <leader> ww - open wiki index file
  • [number] <leader> wt - open wiki index file in new tab
  • <leader> ws - list and select available wikis
  • wd - delete wiki page
@c0m4r
c0m4r / void_linux_ovh_vps.md
Last active May 3, 2024 04:44
Void Linux installation on OVH VPS
@pejalo
pejalo / MemoryUsage.swift
Created February 23, 2018 19:06
Swift 4 iOS app memory usage
/// If an error occurs while getting the amount of memory used, the first returned value in the tuple will be 0.
func getMemoryUsedAndDeviceTotalInMegabytes() -> (Float, Float) {
// https://stackoverflow.com/questions/5887248/ios-app-maximum-memory-budget/19692719#19692719
// https://stackoverflow.com/questions/27556807/swift-pointer-problems-with-mach-task-basic-info/27559770#27559770
var used_megabytes: Float = 0
let total_bytes = Float(ProcessInfo.processInfo.physicalMemory)
@n1snt
n1snt / Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md
Last active May 3, 2024 04:28
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.

@kauefraga
kauefraga / a-main.py
Last active May 3, 2024 04:27
A oração do programador 🙏
print("""
Código nosso que estás em C
Santificado seja vós, Console
Venha a nós o vosso array[10]
E seja feita, sim, {vossa chave}
Assim no if{} como no else{}
O for (nosso; de cada dia; nos dai hoje++)
Debugai as nossas sentenças
Assim como nós colocamos o ponto e vígula esquecido;
E não nos deixeis errar identação
@bradtraversy
bradtraversy / terminal-commands.md
Last active May 3, 2024 04:23
Common Terminal Commands

Common Terminal Commands

Key Commands & Navigation

Before we look at some common commands, I just want to note a few keyboard commands that are very helpful:

  • Up Arrow: Will show your last command
  • Down Arrow: Will show your next command
  • Tab: Will auto-complete your command
  • Ctrl + L: Will clear the screen
@mlanett
mlanett / rails http status codes
Last active May 3, 2024 04:15
HTTP status code symbols for Rails
HTTP status code symbols for Rails
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings.
Status Code Symbol
1xx Informational
100 :continue
101 :switching_protocols
102 :processing
@PARC6502
PARC6502 / OpenSourceBaas.md
Last active May 3, 2024 04:12
List of open source, self hosted BaaS - Backend as a service

Backend as a Service

Supabase - ~52K stars

  • Designed explicitly as an open source firebase alternative
  • Typescript based
  • Docker support

Appwrite - ~32K stars

  • Written in JavaScript and PHP
  • Docker based
  • Realtime support across all services