Skip to content

Instantly share code, notes, and snippets.

View adedomin's full-sized avatar

Anthony DeDominic adedomin

  • Connecticut, USA
View GitHub Profile
@adedomin
adedomin / init.el
Created April 5, 2022 11:29
emacs config
;;; init.el --- Config for Emacs
;;; Commentary:
;;; CODE:
;; Fast Startup
(setq gc-cons-threshold most-positive-fixnum
gc-cons-percentage 0.6)
;; make emacs more XDG by using DATA_HOME for packages
(defvar-local init--my-data-home
(if (getenv "XDG_DATA_HOME")
#!/bin/bash
# ^-- This line tells the kernel that we want the interpreter
# /bin/bash to execute this source file.
# The kernel will see this, and invoke it as
# argv0: <caller supplied, likely /bin/bash>
# argv1: "name of source file"
#
# hash bangs can specify at most one argument (not including interpreter path)
# e.g. #!/usr/bin/env interp
# GNU /usr/bin/env supports a shell splitting feature using --split-string=
@adedomin
adedomin / cat-transfer-chunked.pl
Created November 2, 2019 19:41
helper for use in CGI scripts that may need to send difficult to size content. Must print Transfer-Encoding: chunked before using this script.
#!/usr/bin/perl
# Copyright (c) 2019 Anthony DeDominic <adedomin@gmail.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
# the Software without restriction, including without limitation the rights to
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
# the Software, and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
@adedomin
adedomin / agile-cards.html
Last active June 25, 2018 23:54
web page with the first 12 (sans the extra 1) fibonacci numbers.
<!DOCTYPE html>
<!--
Copyright (c) 2018, Anthony DeDominic <adedomin@gmail.com>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
@adedomin
adedomin / argparse.awk
Last active August 22, 2018 01:45
generalized argparser that handles weird things like -xzfFilename, positional args and other oddities.
#!/usr/bin/awk -Wexec
# Copyright (c) 2018 Anthony DeDominic <adedomin@gmail.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
# the Software without restriction, including without limitation the rights to
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
# the Software, and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
@adedomin
adedomin / do-dyndns.bash
Last active September 21, 2020 20:38
DigitalOcean Dynamic DNS tool
#!/usr/bin/bash
# Copyright (c) 2018, Anthony DeDominic <adedomin@gmail.com>
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
@adedomin
adedomin / calories.awk
Last active November 21, 2017 01:02
Tool to track what I eat, when I eat and a rough estimate of calories consumed.
#!/usr/bin/gawk -Wexec
# Copyright (c) 2017 Anthony DeDominic <adedomin@gmail.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
# the Software without restriction, including without limitation the rights to
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
# the Software, and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
#!/usr/bin/env bash
# Copyright 2016 Anthony DeDominic
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software