Skip to content

Instantly share code, notes, and snippets.

View catm705's full-sized avatar

Cat Gelinas catm705

View GitHub Profile
Steps to modals/landing pages
How to check ipad, iphone on laptop
Steps for urlrewrite/struts
Anything else I need to know - for common front end things?
@catm705
catm705 / gist:604d4cfdad2d4fe2be4ebbab7ebe368a
Created November 1, 2016 14:56
Struts iterator over Map (key, value)
<s:elseif test="phasesMap">
<s:iterator value="phasesMap">
<h3><s:property value="key" /></h3>
<table>
<s:iterator value="value">
<tr><td><s:property value="title" /></td></tr>
</s:iterator>
</table>
</s:iterator>
</s:elseif>
@catm705
catm705 / gist:0d25d43724c9fd9d342c
Last active February 21, 2017 21:06
git BISECT
1.) You checkout to the commit that you want to work backwards from
Ex.
git checkout b434c16c396ae27e0421b6071467138787bd00a7
2.) Then type:
git bisect start
3.) Refresh browser and check out code to see if it's a good starting place where the code works.
4.) If good
@catm705
catm705 / gist:643a4a099e3aa75dc27d
Last active August 29, 2015 14:23
Collapsing git commits & Stashing
___ COLLAPSING COMMITS ___
1. git reset HEAD~ or git reset hEAD@{3}
2. git push -f origin feature/url-ingestion
** Don't do this often and only with permission - it rewrites github's history.
___ STASHING ___
git stash show -p stash@{0} --> This one will show you the differences in code from one stash to the other. The # indicates which.
git stash apply stash@{0} --> This is bring back the stash you choose according to the number you put in the curly braces.
git reset HEAD~ --> This will undo your last commit (only do this if you haven't git pushed it yet)
@catm705
catm705 / gist:0ca0884ce2906a92c544
Last active August 29, 2015 14:21
NOTES on the new components/categories - (NO cards/article-refactor)
____ Example Case _____
TAGS (category) - is a parent to the 'article_artifact' (or 'video_article_artifact') --> The article_artifact is a parent to the components it has.
Components:
-video ('video artifact'), audio, section, image, headline, text, etc
____________ ENDPOINTS _____________
1.) Components Endpoint ('/components')
@catm705
catm705 / gist:709e53c69308b0f03daa
Last active August 29, 2015 14:20
~/.bash_profile & exporting ENV variables
In every new terminal requiring KEYS:
1.) subl ~/.bash_profile
2.) If you want to store env variables --> you need to type it like so
export AWS_KEY=g7aeltvjn43o269v2y5
3.) source ~/.bash_profile --> Type this in the terminal and it'll tell your computer that you updated your environmental variables.
@catm705
catm705 / gist:0bf60df65d83ee0b9599
Last active August 29, 2015 14:08
RELEASE CYCLE - starts with cutting/closing feature, release, hotfix branches
(See notes at bottom of this guide)
______________ STEP 1 OF THE release CYCLE _________________
_____________________( FEATURE BRANCH )_______________________
1.) Pull (update) develop/master first.
Ex.
git checkout develop
@catm705
catm705 / gist:be917925e754eefc6851
Last active August 29, 2015 14:04
BEWD Pull Requests: How to add live app hwk checks to github - Ex. pr/9
This opens pull requests without having to merge them.
https://gist.github.com/piscisaureus/3342247
1.) You'd have to check into their app folder
2.) bundle install, rake db:migrate, possibly rake db:seed
3.) rails s
4.) subl it open in other terminal window
5.) Check their site on localhost:3000
@catm705
catm705 / gist:3b4cfc2cc227b3b04b10
Last active August 29, 2015 14:02
GIT adding and committing files.
Whenever you make any changes:
(You must add and commit all changes BEFORE trying to pull or else it won't work)
1.) cd into that folder where the changes are located.
2.) git add . (This will add all changes, if that doesn't work git add -A)
3.) git commit -m "Your commit message goes here...blah, blah."
4.) git pull upstream master --> This will make sure that you have the most recent files.
5.) git push origin master (This pushes up all your changes to your repo)
1. Go to herokuapp dashboard
2. Go to your app --> then 'settings'
3. Click on 'Get add ons' --> Then find 'New Relic' and click to read the docs
4. Then from within your app in the terminal type: heroku addons:add newrelic:stark
5. Go back to your app on heroku and click on the "New Relic" icon.
6. Then in the page that opens up click on 'I agree'
7. Add this gem to your gemfile --> gem 'newrelic_rpm' in production - like so:
group :production do
gem 'newrelic_rpm'