Skip to content

Instantly share code, notes, and snippets.

View sodapopcan's full-sized avatar

Andrew Haust sodapopcan

View GitHub Profile
@sodapopcan
sodapopcan / gist:a716fbb7d095a06262a26df550006c16
Created February 5, 2025 02:48
Elixir false positive shadow warning
Application.put_env(:sample, Example.Endpoint,
http: [ip: {127, 0, 0, 1}, port: 5001],
server: true,
live_view: [signing_salt: "aaaaaaaa"],
secret_key_base: String.duplicate("a", 64)
)
Mix.install(
[
{:plug_cowboy, "~> 2.5"},
@sodapopcan
sodapopcan / focus_wrap.ex
Last active January 15, 2025 02:42
Possible Focus Wrap Bug
Application.put_env(:sample, Example.Endpoint,
http: [ip: {127, 0, 0, 1}, port: 5001],
server: true,
live_view: [signing_salt: "aaaaaaaa"],
secret_key_base: String.duplicate("a", 64)
)
Mix.install(
[
{:plug_cowboy, "~> 2.5"},
function! s:center_edit(file) abort
if winnr() ==# winnr('$')
topleft vnew
setl readonly
botright vnew
setl readonly
wincmd =
wincmd h
else
exec winnr('$').'wincmd ='
function do_file(filename, callback) {
file_handle = open_file(filename)
callback(file_handle.read())
close_file(file_handle)
}
do_file("some_file.txt", function(contents) {
# do stuff with file contents
})
@sodapopcan
sodapopcan / keybase.md
Created April 2, 2018 15:42
Keybase Proof

Keybase proof

I hereby claim:

  • I am sodapopcan on github.
  • I am nuandrew (https://keybase.io/nuandrew) on keybase.
  • I have a public key ASDBXKCC0eC3W_MRFWX8sdpAwzpzMh0aLgbq7jI1WOGP9wo

To claim this, I am signing this object: