with @zachleat@zachleat.com + @mikeneu@fosstodon.org from @cloudcannon@techhub.social
aka Static Sites with Zach and Mike; Static Chronicles
import prettier from 'prettier'; | |
import babelParser from 'prettier/plugins/babel'; | |
import htmlParser from 'prettier/plugins/html'; | |
const frontmatterRegex = /^---js\n([\s\S]*?)\n---\n/; | |
function parse(text, options) { | |
const match = text.match(frontmatterRegex); | |
if (match) { | |
const frontmatter = match[1]; | |
const content = text.slice(match[0].length); |
with @zachleat@zachleat.com + @mikeneu@fosstodon.org from @cloudcannon@techhub.social
aka Static Sites with Zach and Mike; Static Chronicles
with @zachleat@zachleat.com + @mikeneu@fosstodon.org from @cloudcannon@techhub.social
Follow on Twitch https://www.twitch.tv/cloudcannoncms
# Export current (local) DB
wp db export db.sql
# Copy file from local to server (may need to amend server path if not in html folder)
# The example below is for local to remote, simply swap these 2 around for remote to local
scp -r db.sql www-data@IP_ADDRESS:/var/www/html
# SSH onto box (should be same connection details as above)
From: pngwn/MDsveX#293
In #259 I alluded to other changes in v1, besides the configuration API. The biggest one is something that has been one of my biggest frustration in some regards: markdown itself. Now, lets get this out of the way: markdown is excellent and easily the best document markup format we have ever had. Kudos to Mr Gruber and all who have pushed markdown forward. Nothing in this document should be considered a derogation of markdown, I have nothing but respect and admiration for everything that has brought us to this point. This is a criticism, in many ways, but hopefully a constructive one. It is also just the opinion of a single penguin, and a penguin of questionable character, at that.
Here is a list of scopes to use in Sublime Text 2/3 snippets -
ActionScript: source.actionscript.2
AppleScript: source.applescript
ASP: source.asp
Batch FIle: source.dosbatch
C#: source.cs
C++: source.c++
Clojure: source.clojure
#!/usr/bin/swift sh | |
import Foundation | |
import PromiseKit // @mxcl ~> 6.5 | |
import Swifter // @mattdonnelly == b27a89 | |
let swifter = Swifter( | |
consumerKey: "FILL", | |
consumerSecret: "ME", | |
oauthToken: "IN", | |
oauthTokenSecret: "https://developer.twitter.com/en/docs/basics/apps/overview.html" |
javascript:if(document.getSelection().rangeCount > 0){s='> '+document.getSelection()+'\n\n';}else{s='';};t=document.title;l=location.href;p='['+t+']'+'('+l+')';document.location='microblog://post?text='+encodeURIComponent(s+p); |
let baseString = "/Documents/" | |
let words = ["Alpha", "Beta", "Gamma", "Delta"] | |
var paths : [String] = [] | |
for (var i = 0; i < words.count; ++i) { | |
let word = words[i] | |
paths.append("\(baseString)\(word)") | |
} | |
print(paths) |