Skip to content

Instantly share code, notes, and snippets.

//
// ViewController.swift
// CALayerLearning
//
// update of code from the following tutorial
// https://www.raywenderlich.com/90488/calayer-in-ios-with-swift-10-examples
// see also https://github.com/scotteg/LayerPlayer
import UIKit
@carlynorama
carlynorama / HttpClientAnalog.ino
Created July 7, 2017 20:55
What I would try first
/**
* BasicHTTPClient.ino
*
* Created on: 24.05.2015
*
*/
#include <Arduino.h>
#include <ESP8266WiFi.h>
@carlynorama
carlynorama / SVGFileOutput_HelloWorld.py
Last active January 1, 2018 22:03
Write an SVG file by hand in Python
centerX = 15
centerY = 15
radius = 10
style = "fill:rgb(200,200,255);"
f = open('helloworld.svg','w')
f.write('<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n')
f.write('<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')
f.write('<svg width="100%" height="100%" xmlns="http://www.w3.org/2000/svg">\n')
@carlynorama
carlynorama / SVGWriterTest.js
Created January 1, 2018 22:28
Write SVG to file in Javascript
let centerX = 15
let centerY = 15
let radius = 10
let style = "fill:rgb(200,200,255);"
const fs = require('fs')
let svg = ""
svg += '<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n'
svg += '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'
@carlynorama
carlynorama / calendar_month_as_svg.py
Last active January 2, 2018 17:13
Basic Monthly Calendar Layout Python
#calendarSVG.py
import datetime
import calendar
year = 2018
month = 4
@carlynorama
carlynorama / calendar_svg.js
Last active January 2, 2018 03:38
Output to svg as javascript node package with moment.js included.
const fs = require('fs')
var moment = require('moment')
//https://momentjs.com/docs/#/displaying/
let year = 2018
let month = 0
let viewBoxWidth = 2550
let viewBoxHeight = 3300
let radius = viewBoxWidth/16
@carlynorama
carlynorama / bulletjournal_svg.js
Last active January 2, 2018 18:52
Calendar, but in bullet journal style
const fs = require('fs')
var moment = require('moment')
//https://momentjs.com/docs/#/displaying/
let year = 2018
let month = 0
//(300 per inch)
let viewBoxWidth = 2550
let viewBoxHeight = 3300
@carlynorama
carlynorama / calendar_scratch.py
Created January 4, 2018 21:36
Playing around with Python 2.7 Calendar Module
import calendar
#https://docs.python.org/2/library/calendar.html
print(calendar.weekheader(5))
calendar.prcal(2018)
year = 2018
month = 2
#week = 1
@carlynorama
carlynorama / alternate_nav.html
Last active January 9, 2018 20:10
liquid template for pulling out the list of collections with jekyll. Alphabetical sort order only as of late 2017
<--! for use with data YAML file to force order -->
{% for item in site.data.collection_nav.nav %}
<a class="page-link" href="{{ site.baseurl }}/{{ item.url }}" alt="{{ item.title }}">{{ item.title }}</a></li>
{% endfor %}
125 git remote add remotenickname https://github.com/remote/url
127 git add .
128 git commit -m "initial migration commit"
130 git push remotenickname branchname