Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am codystringham on github.
  • I am cskalechip (https://keybase.io/cskalechip) on keybase.
  • I have a public key ASB2M6uvYhCwr2s1udI46VCfoo-P_lwLuKlBzvBTpOzjWAo

To claim this, I am signing this object:

@CodyStringham
CodyStringham / ELVUI.txt
Last active March 5, 2022 16:55
Rogue Weak Aura
A0ReCgAgCMosJbcQahcKDRNyDKmWIXgmimkquoYq2yDwDVU1TpQ6h1LWoaCDKmghKg9RqjIRpcpFqDYq9FFBIyHVSYhmouimqHaS6qeioUItVeApMVXqKkq2qgB9haA6qwJ4qwJ1VwWyl/qLkMEocBhYrNRjSCYj5bKqzSr0GZHRUJxWaTVKVb0WJbMFtyG0W+Q3yXBELQc9J2W65DqUtiP5DinjIUjnUZX1EMR+lMrDFZBJK6A23W2hgQIbQM1tAbDuEaDKbfkEdnhvlwWjkoJuyyeww3u7XBYUFsJP1dhS8IJgnc1C+vQQBLdlqyqFGIP0wduyASqLBhX5CGiPUkFBt2Vbjxgj3mkhWY8YI95pgdYjxoh3uiwUCNhHqaCg27KtR4zZdDYLyXrEyKNnLNB6xBixuSxbQdpDlAoKui3bemQhWY8s0HrkclkQFfVQc1vwQLFGogG4tDPKFfXQ0jNm4mMvPFAsZAzgp1rc7J45Ex97nevMECx4oA45IrqFm90zZ+JjLzxQLGQM4Kda3OyeORMfe50EwjoteKAOOSKChZvdMx8gh+i98ECxkDGAn2pxs3vmA+QQvRfxSaCv04IH6pAjOi3c7J75ADlE74UHioWMAfxUi5vdMx8gh+i9iE86b9FPggUP1CFHlLFws3vmCw8UCxkD+KkWN7tnvqJ1WuZm/6PqUj9CgPi5oh5aesYD5BC9Fx4oFjIG8FOtnvEAOUTvRcxjW8QEOs+CB4o1Eg3ApZG/ckU9tPSMmfjYCw8UCxkD+KkWN7tnzsTHXufizxAsgrnHOuQsPWMmPvbCA8VCxgB+qsXN7pkz8bHXufgzBEurekQOwFxRDy3c7J45Ex974YFiIWMAP9XiZvfMmfjY66RnLwKPbsEDxRqJGqSsXFEPLT1jJj72wgPFQsYAfqrFze6ZM/Gx17kQEHgWTmka+gPaw1xRDy3c7J75ADlE74UHioWMAfxUi5vdMx8gh+i9iM9FOCMLHijWSBQHwPcwV9RDCze7Z77wQLGQ
@CodyStringham
CodyStringham / editing.md
Last active September 11, 2017 15:03
Helpful Shell Stuff!

Shell Editing

Change hello to goodbye

This will create a duplicate file called greetings.txt.old so you can compare.

sed -i '.old' 's/Hello/Goodbye/' greetings.txt

Undo if mistakes

@CodyStringham
CodyStringham / nginx-and-puma.md
Last active February 6, 2016 08:04
Reverse proxy all day

Setting up NGINX and PUMA

This is a working document for me, hopefully I will eventually figure out how to run multiple puma apps on the same server. First of all, lets start fresh here.

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys ABF5BD827BD9BF62

Now add this to the bottom of /etc/apt/sources.list:

Setup:

Fresh Image Install

  1. diskutil list - Find the sd card

  2. sudo diskutil unmount /dev/disk2 - Unmount the bad boy

  3. sudo dd bs=1m if=/path/to/the.img of=/dev/disk2- Apply new image

# admin/seo/_seo_form.html.erb
<div class='full-inputs'>
<%= simple_form_for seo, remote: true, url: admin_update_seo_path(seo) do |f| %>
<%= f.input :content, required: true, as: :text, input_html: {rows: 2, maxlength: "#{ seo.name == 'title' ? '70' : '155' }"}, label: seo.name.try(:humanize), hint: "<span class='character-count green'> </span> #{seo.name.try(:humanize)} should be no longer than #{ seo.name == 'title' ? '70' : '155' } characters" %>
<div class='text-center'>
<button class='btn btn-primary'>Update</button>
<a href="#<%= page %>" class='cancel-seo btn btn-warning' data-attribute="<%=f.object.id %>"> Cancel</a>
<% end %>

.powenv

# detect `$rvm_path`
if [ -z "${rvm_path:-}" ] && [ -x "${HOME:-}/.rvm/bin/rvm" ]
then rvm_path="${HOME:-}/.rvm"
fi
if [ -z "${rvm_path:-}" ] && [ -x "/usr/local/rvm/bin/rvm" ]
then rvm_path="/usr/local/rvm"
fi
@CodyStringham
CodyStringham / killing sessions.md
Last active August 29, 2015 13:56
Postgres Restart

####Killing Sessions

ps aux | grep postgres
kill -9 process-number

-9 is dangerous, will force kill

####PG Restart

ps aux | grep postgres