update js and ruby snippets