Skip to content

Instantly share code, notes, and snippets.

View javier-lopez's full-sized avatar
🏠
Working from home

Javier López javier-lopez

🏠
Working from home
View GitHub Profile
@andytlr
andytlr / _description.md
Last active August 1, 2023 08:02
Convert SVG <polyline> to <path> so they can be animated with D3 etc.

Convert SVG polyline to path

Replace all instances of <polyline with <path and points=" with d="M.

 <?xml version="1.0" encoding="utf-8"?>
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
 <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="1000px" height="1000px" viewBox="0 0 1000 1000" enable-background="new 0 0 1000 1000" xml:space="preserve">
-<polyline fill="#FFFFFF" stroke="#000000" stroke-miterlimit="10" points="100.712,141.534 582.904,227.835 425.37,478.521
+
@snipe
snipe / googleform2email
Last active November 16, 2017 21:37
Script to get the contents of a Google form submission emailed to you.
function sendFormByEmail(e)
{
// Remember to replace this email address with your own email address
var email = "you@example.com";
var s = SpreadsheetApp.getActiveSheet();
var headers = s.getRange(1,1,1,s.getLastColumn()).getValues()[0];
var message = "";
var subject = "New Hire: ";
@wrunk
wrunk / python_yaml_example.py
Created June 19, 2012 00:02
Quick python example of using yaml
'''
This is a quick reference example to get you started with yaml. Please review this,
but spend the time to fully read the wikipedia page on yaml:
http://en.wikipedia.org/wiki/Yaml
Note that the magic quote-less yaml parsing will still always strip values.
To avoid this you need to use quotes. Quotes can also force types to string type,
and are always valid (meaning omitting quotes is for convenience not necessity).
'''