If you need to restructure your commit history (squash multiple commits into one, remove commits, etc.) use the command (where N is the number of commits to include in the restructure):
git rebase -i HEAD~N
E.g.,
git rebase -i HEAD~3
var zip = new require('node-zip')() | |
us.map(blog.posts, function(post) { | |
if (post.is_attachment) { | |
console.log("Downloading: " + post.attachment_url) | |
request(post.attachment_url, function(error, response, body) { | |
if (!error && response.statusCode == 200) { | |
console.log("Saving " + post.folder + post.fileName) | |
zip.file(post.folder + post.fileName, body) | |
} | |
}) |
package com.edatasource.receipts.parser; | |
import org.junit.Test; | |
import java.text.SimpleDateFormat; | |
import java.util.ArrayList; | |
import java.util.Date; | |
import java.util.List; | |
/** |
package com.cedarsoftware.util; | |
import java.text.DateFormatSymbols; | |
import java.text.NumberFormat; | |
import java.text.ParseException; | |
import java.text.SimpleDateFormat; | |
import java.util.Calendar; | |
import java.util.Date; | |
import java.util.HashMap; | |
import java.util.Map; |
<?php | |
/* | |
Based on some other things I've seen online. | |
1: Edit the vars | |
2: Put on server somewhere accessible, e.g. your site folder as github.php | |
3: chmod +x github.php | |
4: Repo settings, add webhook to that url | |
*/ | |
$LOCAL_ROOT = "/home/username/site.com"; |
If you need to restructure your commit history (squash multiple commits into one, remove commits, etc.) use the command (where N is the number of commits to include in the restructure):
git rebase -i HEAD~N
E.g.,
git rebase -i HEAD~3
# insert from a select query | |
INSERT INTO table (column1,column2) | |
SELECT column1,column2 | |
FROM ... | |
# dropping tables | |
DROP TABLE IF EXISTS tablename; | |
[color] | |
sh = auto | |
ui = auto | |
pager = true | |
[user] | |
name = User Name | |
email = email@domain.com | |
[alias] | |
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit | |
[core] |
'use strict' | |
var fs = require('fs') | |
var request = require('request') | |
var htmlparser = require("htmlparser2") | |
var toMarkdown = require('to-markdown').toMarkdown | |
var mkdirp = require('mkdirp') | |
if (process.argv[3] === undefined) { | |
console.log("Usage: node wikimedia-markdown-export.js [text file of all pages to export] [site domain]") |
First convert DOC
to DOCX
using LibreOffice:
/Applications/LibreOffice.app/Contents/MacOS/soffice --invisible --convert-to docx file.doc
Then convert to Markdown using pandoc:
pandoc file.docx -f docx -t markdown -o file.md
Convert to Markdown, extracting the image files: