If you, like me, resent every dollar spent on commercial PDF tools,
you might want to know how to change the text content of a PDF without
having to pay for Adobe Acrobat or another PDF tool. I didn't see an
obvious open-source tool that lets you dig into PDF internals, but I
did discover a few useful facts about how PDFs are structured that
I think may prove useful to others (or myself) in the future. They
are recorded here. They are surely not universally applicable --
the PDF standard is truly Byzantine -- but they worked for my case.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* It takes a URL and options, and returns a response object | |
* @param url - The URL to fetch. | |
* @param [options] - The options object that will be passed to the fetch function. | |
* @returns The return value of the useFetch hook. | |
*/ | |
import {useFetch, useRuntimeConfig} from "nuxt/app"; | |
export default function useFetchApi(url, options = {}) { | |
const config = useRuntimeConfig(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script lang="ts"> | |
import { VNodeData } from 'vue' | |
import { defineComponent } from '@vue/composition-api' | |
/** | |
* Use this component to render raw SVG content | |
* without the need to use the `v-html` directive | |
* which requires a parent node in Vue 2.x (ex: `<div v-html="..."></div>`). | |
* `<NSvgFragment :src="..." />` will directly render the svg tag with its content. | |
* */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Optimized my.cnf configuration for MySQL/MariaSQL | |
# | |
# by Fotis Evangelou, developer of Engintron (engintron.com) | |
# | |
# ~ Updated January 2020 ~ | |
# | |
# | |
# The settings provided below are a starting point for a 2GB - 4GB RAM server with 2-4 CPU cores. | |
# If you have different resources available you should adjust accordingly to save CPU, RAM & disk I/O usage. | |
# |
Similar to my Jetbrains/IntelliJ/Webstorm setup, this is a gist with everything I use on my vscode setup.
I plan to always keep it up to date.
Recommended to have git bash installed.
- Tips & Tricks
- Keyboard shortcuts (Other operating systems’ keyboard shortcuts at aka.ms/vscodekeybindings, or Go to Help -> Keyboard Shortcuts Reference)
- Interative Playground. Go to Help -> Interative playground
- Release notes(they always show cool existing and new features)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/python | |
# by pts@fazekas.hu at Tue Oct 11 13:12:47 CEST 2016 | |
""":" #megapubdl: Download public files from MEGA (mega.nz). | |
type python2.7 >/dev/null 2>&1 && exec python2.7 -- "$0" ${1+"$@"} | |
type python2.6 >/dev/null 2>&1 && exec python2.6 -- "$0" ${1+"$@"} | |
type python2.5 >/dev/null 2>&1 && exec python2.5 -- "$0" ${1+"$@"} | |
type python2.4 >/dev/null 2>&1 && exec python2.4 -- "$0" ${1+"$@"} | |
exec python -- ${1+"$@"}; exit 1 |
I’m looking for any tips or tricks for making chrome headless mode less detectable. Here is what I’ve done so far:
Set my args as follows:
const run = (async () => {
const args = [
'--no-sandbox',
'--disable-setuid-sandbox',
'--disable-infobars',
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Shortest GUI program written in Golang. | |
// It displays a window and exits when the "close" button of the window is clicked. | |
package main | |
import ( | |
"golang.org/x/exp/shiny/driver" | |
"golang.org/x/exp/shiny/screen" | |
// Despite that the package names have a "mobile" prefix, | |
// these packages works on desktop. |
NewerOlder