Skip to content

Instantly share code, notes, and snippets.

@gastongouron
gastongouron / last-style.js
Created Dec 11, 2015 — forked from marwan-nwh/last-style.js
get the last element on the dom by class and apply style to it
View last-style.js
<script type="text/javascript">
c=document.getElementsByClassName("comment-inner");
last_element = c[c.length - 1];
last_element.style.borderBottomWidth="0";
</script>
@gastongouron
gastongouron / index.md
Created Nov 26, 2015 — forked from rstacruz/index.md
Rails models cheatsheet
View index.md

Rails Models

Generating models

$ rails g model User

Associations

belongs_to
has_one
@gastongouron
gastongouron / js
Created Nov 8, 2015
Javascript RPN Calculator
View js
// JSRPN - a simple console display javaScript RPN calculator
// by Lars Johnson and Paul Gaston Gouron
var RPN = function(string){
var poppush = function () {
stack.pop()
stack.pop()
stack.push(value)
}
You can’t perform that action at this time.