Skip to content

Instantly share code, notes, and snippets.

View arubis's full-sized avatar

Dylan Fitzgerald arubis

View GitHub Profile
@grovesNL
grovesNL / unblock-domain.md
Last active August 14, 2023 17:03
Unblock domains from security filters

What is this?

When you register a new domain and start hosting content there, people might not be able to view it if they're behind some kind of security software or hardware that filters by domain (e.g. web/content/DNS filters). This is because the domain is new and hasn't been categorized by the security filter, and filters commonly don't allow traffic to uncategorized domains.

Usually people can contact their security provider to request the domain to be unblocked, but:

  • this process can take a few days or longer
  • sometimes this has to be handled by IT internally and might not be escalated to the provider
    • because of this, sometimes the domain will just be unblocked for a set of people (e.g. everyone at a company) and other companies have to repeat this
  • depending on how the filtering is implemented (e.g. how requests/responses are intercepted), websites might just appear broken instead of getting an explicit message about the website being blocked
  • usually this approach is reactionary, because

Ecto Changeset Demo and Talk

What is Ecto?

  • Historic personal use of Active Record pattern in PHP, Rails, iOS dev.
  • Ecto described itself as a toolkit for data mapping and language integrated query for Elixir.
  • Changeset were (for me) a new concept that I've really come to appriciate.

Many of the demos you'll see come from Ecto's own Getting Started and I encourage you to check it out as well.

(defun vulpea-project-p ()
"Return non-nil if current buffer has any todo entry.
TODO entries marked as done are ignored, meaning the this
function returns nil if current buffer contains only completed
tasks."
(seq-find ; (3)
(lambda (type)
(eq type 'todo))
(org-element-map ; (2)
# frozen_string_literal: true
class SlowCall
def self.work
@work ||= Concurrent::Promises.future(name: "load #{self.class.name}") do
sleep 2
Time.now
end
end
end
@marteinn
marteinn / instructions.md
Last active October 13, 2024 21:42
This is a Phoenix + React-Create-App integration with very small footprint
  1. Begin with scaffolding a create-react-app, then update your package.json build script (replace DIR_TO_PHX_APP with the path to your phoenix app)
"build": "react-scripts build && rm -rf DIR_TO_PHX_APP/priv/static/build && mv build DIR_TO_PHX_APP/priv/static/build",

This will move your prod build files to DIR_TO_PHX_APP/priv/static/build on build

  1. Run npm run build
@3noch
3noch / keybase+git-crypt.md
Last active February 16, 2020 20:55
How to add a Keybase user to your repo using git-crypt
keybase pgp pull <keybase.io user>
gpg --edit-key <keybase.io user>
  > lsign
  > save
git-crypt add-gpg-user <keybase.io user>

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@DeLaGuardo
DeLaGuardo / pragmatapro-font-lock-symbols-v2.el
Last active February 28, 2024 01:27
Snippet for support ligatures from PragmataPro font in Emacs
;; Enable ligatures without prettify-symbols
(provide 'add-pragmatapro-symbol-keywords)
(defconst pragmatapro-fontlock-keywords-alist
(mapcar (lambda (regex-char-pair)
`(,(car regex-char-pair)
(0 (prog1 ()
(compose-region (match-beginning 1)
(match-end 1)
@526avijitgupta
526avijitgupta / spacemacs-cheatsheet.md
Last active August 29, 2023 12:31
Spacemacs cheatsheet

emacs --daemon to run in the background. emacsclient.emacs24 <filename/dirname> to open in terminal

NOTE: "M-m and SPC can be used interchangeably".

  • Undo - C-/
  • Redo - C-?
  • Change case: 1. Camel Case : M-c 2. Upper Case : M-u
  1. Lower Case : M-l
@jahio
jahio / dna.json
Created March 29, 2014 03:20
Example dna.json for Engine Yard Cloud
{
"alert_email": "email address where you want automated warnings to go",
"backup_interval": "int value for db backups, configurable on dashboard",
"backup_window": "int value for db backups, configurable on dashboard",
"ruby_version": "Ruby 1.9.3 - could be 2.0.0 or something else",
"db_host": "internal hostname of your database master",
"db_slaves": [
"db replica hosts appear here. only works with [Postgre|My]SQL"
],
"user_ssh_key": [