Skip to content

Instantly share code, notes, and snippets.

View DavidVII's full-sized avatar
👨‍💻
Ghost in the code

David Becerra DavidVII

👨‍💻
Ghost in the code
View GitHub Profile
@DavidVII
DavidVII / codex_beam_bootstrap.sh
Created June 13, 2025 06:39 — forked from vkryukov/codex_beam_bootstrap.sh
Installing Elixir/Erlang on Codex
#!/usr/bin/env bash
###############################################################################
# codex_beam_bootstrap.sh ─ OTP 27 + Elixir 1.18 behind Codex MITM proxy
###############################################################################
go install github.com/asdf-vm/asdf/cmd/[email protected]
asdf plugin add erlang https://github.com/michallepicki/asdf-erlang-prebuilt-ubuntu-24.04.git || true
asdf plugin add elixir
asdf install erlang 27.3.4
asdf set -u erlang 27.3.4
const webpack = require("webpack");
const path = require("path");
// We'll set up some paths for our generated files and our development server
const staticDir = path.join(__dirname, ".");
const destDir = path.join(__dirname, "../priv/static");
const publicPath = "/";
// We'll be using the ExtractTextPlugin to extract any required CSS into a
// single CSS file
@DavidVII
DavidVII / .bash_profile
Created August 2, 2017 16:27 — forked from JeffreyWay/.bash_profile
Prettier git logs
alias gl="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
t = 236 # seconds
Time.at(t).utc.strftime("%H:%M:%S")
=> "00:03:56"
# Reference
# http://stackoverflow.com/questions/3963930/ruby-rails-how-to-convert-seconds-to-time
@DavidVII
DavidVII / README.md
Last active November 19, 2015 19:51
Return a list of tagged (polymorphic) records.

Models

  • Tag
  • Tagging (join table)
  • Taggable (Polymorphic: Video, Article, Recipe)
@DavidVII
DavidVII / countries.rb
Created April 12, 2014 00:25
An array of countries in Ruby
[
"Afghanistan", "Aland Islands", "Albania", "Algeria",
"American Samoa", "Andorra", "Angola", "Anguilla", "Antarctica",
"Antigua", "Argentina", "Armenia", "Aruba", "Australia", "Austria",
"Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Barbuda",
"Belarus", "Belgium", "Belize", "Benin", "Bermuda", "Bhutan", "Bolivia",
"Bosnia", "Botswana", "Bouvet Island", "Brazil",
"British Indian Ocean Trty.", "Brunei Darussalam", "Bulgaria",
"Burkina Faso", "Burundi", "Caicos Islands", "Cambodia", "Cameroon",
"Canada", "Cape Verde", "Cayman Islands", "Central African Republic",
# Navigating
visit('/projects')
visit(post_comments_path(post))
# Clicking links and buttons
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')

Capybara

save_and_open_page

Matchers

have_button(locator)