Skip to content

Instantly share code, notes, and snippets.

View anderflash's full-sized avatar

Anderson Tavares anderflash

View GitHub Profile
@anderflash
anderflash / svgexternal.html
Last active August 29, 2015 13:57
Usar JavaScript em SVG externo
<!--Primeiro você usa a tag object (e não o img) -->
<object data="assets/svg/armor.svg" type="image/svg+xml" onload="extract($(this));" id="elema"></object>
<script type="text/javascript">
//Depois você extrai o fonte
function extract(obj) {
myid = obj.attr('id');
var svg = document.getElementById(myid);
@anderflash
anderflash / correctBibUrl.sh
Created December 3, 2013 05:00
Remove backslashes from 'url' field of exported Mendeley .bib files (correcting article links)
#!/bin/sh
# correctBibUrl <library.bib> <outputLibrary.bib>
cat "$1" | sed -e '/^url/s/[\\]//g' > "$2"