Skip to content

Instantly share code, notes, and snippets.

View geoherna's full-sized avatar
In need of more coffee

George geoherna

In need of more coffee
  • New York, NY
View GitHub Profile
@IshanFx
IshanFx / carousel.dart
Created October 30, 2021 13:34
Flutter Carousel
@Te-k
Te-k / pdf_metadata.md
Created November 26, 2020 10:31
How to remove metadata from PDFs

Many tools do not fully remove metadata, but just remove the link with in the metadata table. The data are thus still available in the PDF file itself.

While a lot of people rely on Exiftool to remove metadata, it actually does the same in PDFs. If you remove metadata with exiftool -all= some.pdf, you can always restore the data with exiftool -pdf-update:all= some.pdf.

There are several options to remove PDF metadata safely:

Option 1 : Exiftool with qpdf

  • Remove metadata with exiftool : exiftool -all= some.pdf
  • Then remove ununsed objects with qpdf : qpdf --linearize some.pdf - > some.cleaned.pdf
@geoherna
geoherna / vehicles.swift
Last active December 25, 2019 20:43
Swift Dictionary of vehicle make and models
//
// VehicleList.swift
//
// Created by George Hernandez on 12/25/19.
//
import Foundation
let Vehicles: Dictionary<String, Array<String>> = [
"Acura":
@mholt
mholt / macapp.go
Last active July 1, 2025 04:08
Distribute your Go program (or any single binary) as a native macOS application
// Package main is a sample macOS-app-bundling program to demonstrate how to
// automate the process described in this tutorial:
//
// https://medium.com/@mattholt/packaging-a-go-application-for-macos-f7084b00f6b5
//
// Bundling the .app is the first thing it does, and creating the DMG is the
// second. Making the DMG is optional, and is only done if you provide
// the template DMG file, which you have to create beforehand.
//
// Example use:
@sosedoff
sosedoff / 1_simple.go
Created July 16, 2016 18:45
Golang Custom Struct Tags Example
package main
import (
"fmt"
"reflect"
)
// Name of the struct tag used in examples
const tagName = "validate"
@krodak
krodak / UIViewController+TabBarAnimations
Last active March 3, 2018 19:15
UIViewController extension for hidding UITabBarController
import UIKit
extension UIViewController {
func setTabBarVisible(visible:Bool, animated:Bool) {
//* This cannot be called before viewDidLayoutSubviews(), because the frame is not set before this time
// bail if the current state matches the desired state
if (tabBarIsVisible() == visible) { return }