Skip to content

Instantly share code, notes, and snippets.

View igorlfs's full-sized avatar

Igor Lacerda igorlfs

  • Belo Horizonte, Brazil
  • 00:03 (UTC -03:00)
View GitHub Profile
@MariaSolOs
MariaSolOs / builtin-compl.lua
Last active April 7, 2025 04:53
Built-in completion + snippet Neovim setup
---Utility for keymap creation.
---@param lhs string
---@param rhs string|function
---@param opts string|table
---@param mode? string|string[]
local function keymap(lhs, rhs, opts, mode)
opts = type(opts) == 'string' and { desc = opts }
or vim.tbl_extend('error', opts --[[@as table]], { buffer = bufnr })
mode = mode or 'n'
vim.keymap.set(mode, lhs, rhs, opts)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Using TheMovieDB</title>
<meta name="viewport" content="width=device-width">
<!-- API version 3 documentation:
https://developers.themoviedb.org/3/search
https://developers.themoviedb.org/3/movies
-->
@mogsdad
mogsdad / Apps Script pdfToText utility.md
Last active February 21, 2025 22:46
For http://stackoverflow.com/questions/26613809, a question about getting pdf attachments in gmail as text. I got a little carried away - this does much more than asked.

Google Apps Script pdfToText Utility#

This is a helper function that will convert a given PDF file blob into text, as well as offering options to save the original PDF, intermediate Google Doc, and/or final plain text files. Additionally, the language used for Optical Character Recognition (OCR) may be specified, defaulting to 'en' (English).

Note: Updated 12 May 2015 due to deprecation of DocsList. Thanks to Bruce McPherson for the getDriveFolderFromPath() utility.

    // Start with a Blob object
    var blob = gmailAttchment.getAs(MimeType.PDF);