Skip to content

Instantly share code, notes, and snippets.

View fmartingr's full-sized avatar

Felipe Martin fmartingr

View GitHub Profile
@fmartingr
fmartingr / Rakefile
Created December 5, 2012 15:55 — forked from jarrettmeyer/Rakefile
Octopress publish drafts
require "rubygems"
require "date"
# Configuration
base_dir = Dir.pwd
blog_dir = "#{base_dir}/blog"
source_dir = "#{blog_dir}/source"
posts_dir = "#{source_dir}/_posts"
git_remote = "origin"
git_branch = "master"
# Orignal version taken from http://www.djangosnippets.org/snippets/186/
# Original author: udfalkso
# Modified by: Shwagroo Team and Gun.io
import sys
import os
import re
import hotshot, hotshot.stats
import tempfile
import StringIO
B7ED7A66C80B4B008BAF7F0589C08224
All the cool kids post mysterious RNG seeds.
This isn't anything particularly useful or important, uncovered ages ago but apparently there are still 0 google search results for it.
First, I guess.
@fmartingr
fmartingr / pocket2shiori.sh
Last active October 4, 2022 20:05 — forked from dchakro/pocket2shiori.sh
script to import pocket entries into shiori with text, images etc. instead of plain bookmarks.
#!/bin/sh
# Extracting URLs from the exported HTML from getpocket.com/export
# In the following line $1 is the exported HTML from pocket
# which will be passed to this script as a CLI parameter
grep -Eoi '<a [^>]+>' $1 | grep -Eo 'href="[^\"]+"' | cut -d'=' -f 2- | tr -d '"' | tac > pocket2shiori.txt
# Reading the URLs one by one and adding to shiori
while IFS= read -r line; do
shiori add $line