- Copy-paste to split book into separate chapter files
- Fix inline spans broken by a space after a word before the closing
*
- Remove image width and height inherited from images in docx
- Wrap all images in an Electric Book figure blockquote
- Simplify indentation in lists by reducing space after list marker to one space
- Remove non-kramdown markdown
^
around superscripts after numbers - Wrap the opening words of a paragraph in a span
- Find an email address
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# List all branches and their hashes on remote | |
git ls-remote --head | |
# List all tags and their hashes on a remote server | |
git ls-remote -t | |
# Get hash for a specific tag | |
git rev-parse v1.1.0 | |
# Get last tag for current branch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// allowCat contains all catergory ID that you want on your page | |
$allowCat = array(2,3,4,5,6); | |
function article_category_id() { | |
if($category = Registry::prop('article', 'category')) { | |
$categories = Registry::get('all_categories'); | |
return $categories[$category]->id; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Plugin Name: My Plugin */ | |
include( dirname( __FILE__ ) . '/library/admin-page-framework.php' ); | |
if ( ! class_exists( 'MyPluginName_AdminPageFramework' ) ) { | |
return; | |
} | |
class MyPluginName extends MyPluginName_AdminPageFramework { | |
//... Start code here ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Photoshop Script to Create iPhone Icons from iTunesArtwork | |
// | |
// WARNING!!! In the rare case that there are name collisions, this script will | |
// overwrite (delete permanently) files in the same folder in which the selected | |
// iTunesArtwork file is located. Therefore, to be safe, before running the | |
// script, it's best to make sure the selected iTuensArtwork file is the only | |
// file in its containing folder. | |
// | |
// Copyright (c) 2010 Matt Di Pasquale | |
// Added tweaks Copyright (c) 2012 by Josh Jones http://www.appsbynight.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for file in * | |
do | |
date=`cut -d' ' -f 1 <<< "$file"` | |
dir=${file%".jpg"} | |
mkdir "$dir" | |
mv "$file" "$dir" | |
time=`cut -d' ' -f 2 <<< "$file" | sed -e 's/\./\:/g'` | |
datetime=$date'T'$time'+00:00' | |
printf '%s\n' '---' 'categories: ["instagram"]' "date: $datetime" 'description: ""' 'draft: false' 'resources:' " - src: '$file'" ' name: "header"' 'layout: instagram' 'slug:' 'stories:' 'subtitle:' 'title: Untitled' 'options:' ' unlisted: false' ' showHeader: true' '---' '' "<img src=\"$file\" />" | tee $dir/index.md $dir/index.pt.md | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
INCLUDE="/etc/nginx/incl/basicauth.conf" | |
SOURCEDIR="/home/Digital-Insanity/content/" | |
read -p "Website nginx directory without trailling slash [/var/web/brunoamaral.eu]:" publicDir | |
publicDir=${publicDir:-/var/web/brunoamaral.eu} | |
read -p "Which directory should we protect? (no trailling slash)" relUrl | |
htpasswd -c "$publicDir$relUrl/.htpasswd" nginx; | |
cp "$publicDir$relUrl/.htpasswd" "$SOURCEDIR$relUrl" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import markdown in InDesign | |
#source : https://github.com/ambroisemaupate/indesign-scripts/blob/master/markdown.jsx | |
#target indesign; | |
main(); | |
function fuzzyIndex(list, string) { | |
for(var i = 0; i < list.length; i++) { | |
if(list[i].indexOf(string) != -1) { | |
return i; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# That tells Linux to use a Bourne shell interpreter. | |
# Run this script from the current directory. (Required on OSX.) | |
cd -- "$(dirname "$0")" | |
# Don't echo these commands. | |
set +v | |
# Get the filename from the user. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head></head> | |
<body> | |
<div class="noticia">CARGANDO</div> | |
<script src="https://code.jquery.com/jquery-3.1.0.js"></script> | |
<script> | |
$(function(){ | |
var url = 'https://www.domain.co/index.xml'; | |
var news = $('.noticia'); |
NewerOlder