Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.
You've got two main options:
| function dl | |
| set prev (pwd) | |
| set songs "$HOME/Documents/Music/Songs" | |
| cd $songs | |
| youtube-dl -x --audio-format \"wav\" $argv | |
| cd $prev | |
| end | |
| func CreatePDFFromHTML(inputHTML []byte) ([]byte, error) { | |
| dirName, err := ioutil.TempDir("", "pdf-generator") | |
| if err != nil { | |
| return nil, err | |
| } | |
| // remove this and log the dirName if you need to debug the HTML | |
| defer os.RemoveAll(dirName) | |
| // log.Println(dirName) |
| // Installation: | |
| // yarn add -D @codemod/cli @babel/plugin-syntax-jsx @babel/generator | |
| import jsx from '@babel/plugin-syntax-jsx'; | |
| import generate from '@babel/generator'; | |
| const COLOR_MAP = { | |
| 'white': 'white', | |
| 'near-white': 'gray-100', | |
| 'light-gray': 'gray-200', |
Iheanyi,
I realize your app may not be ruby-based, but here's how I've worked with this dilemma in mind in our app. To start, yes, we don't necessarily support custom CSS, but I do have a database field I (as admin) can add custom CSS to a customer's account template (in the case they have "premium support" or something). Our publicly customizable style settings are key:value based and stored as a JSON object in psql as you suggested might be an option. Here's how I make it less unweildy:
Field in the database:
t.json :settings
| package web | |
| import ( | |
| "bytes" | |
| "encoding/json" | |
| "io" | |
| "net/http" | |
| ) | |
| type errorResponse struct { |
| from os import environ | |
| from google.appengine.ext import ndb | |
| from google.appengine.ext.ndb import model | |
| from pydash import snake_case | |
| class Config(ndb.Model): | |
| value = ndb.StringProperty() | |
| value_previous = ndb.StringProperty() |
| @import './tachyons/tachyons'; // tachyons source | |
| @import './_custom'; // any custom css | |
| @import './_vars'; // put last because that is how CSS vars work... | |
| /* | |
| in _vars.css you can override tachyons vars | |
| :root { | |
| --navy: #001624; |
| function formToData(form) { | |
| const formData = new FormData(form.get()[0]) | |
| var params = new Map() | |
| var errors = [] | |
| var inputElements = {} | |
| // Initially iterate through all the inputs | |
| form.find(':input').each(function(key, value) { | |
| var elem = $(this) | |
| var name = elem.attr('name') |