Skip to content

Instantly share code, notes, and snippets.

View brunoalves's full-sized avatar

Bruno Alves brunoalves

View GitHub Profile
$ cd /diretorio-do-ghost/content/data
$ sqlite3 ghost.db
sqlite> UPDATE posts SET image = '/content/images/2013/Dec/imagem_post.png' WHERE id=10;
sqlite> .exit
@brunoalves
brunoalves / gist:7771723
Created December 3, 2013 15:58
Imagem do post no tema do Ghost.org
{{#if image}}
<a href="{{url}}"><img class="post-avatar" alt="{{title}}" src="{{image}}" height="48" width="48" /></a>
{{/if}}
@brunoalves
brunoalves / gist:7683005
Created November 27, 2013 20:53
Custom post type feed rewrite
<?php
function artigo_feed_rewrite( $wp_rewrite ) {
$feed_rules = array(
'feed/artigos' => 'index.php?post_type=listing&feed=rss2'
);
$wp_rewrite->rules = $feed_rules + $wp_rewrite->rules;
}
// regerar regras de permalinks depois de ativar / implementar esse código
@brunoalves
brunoalves / gist:7450306
Created November 13, 2013 14:50
Comentários do Google Plus no Ghost.org. Mais informações em http://bruno.alves.in/adicionando-comentarios-do-google-plus-no-ghost/
<section class="comment">
<div class="g-comments" data-href="{{url absolute="true"}}" data-first_party_property="BLOGGER" data-view_type="FILTERED_POSTMOD">Loading Google+ Comments ...</div>
<script async type="text/javascript" src="//apis.google.com/js/plusone.js?callback=gpcb"></script>
<noscript>Please enable JavaScript to view the <a href="https://plus.google.com/">comments powered by Google+.</a></noscript>
</section>
@brunoalves
brunoalves / google++.ubiq.js
Created October 7, 2009 17:54 — forked from satyr/google++.ubiq.js
Buscas no Google Brasil
const
Google = 'http://www.google.com.br/',
GImage = 'http://image.google.com.br/',
GVideo = 'http://video.google.com.br/',
Gmail = 'https://mail.google.com.br/mail/',
GReader = Google +'reader/',
GReaderS = GReader.replace(/:/, 's:'),
GCode = Google + 'codesearch',
GSgFAQ = 'suggest'.link('http://labs.google.com/suggestfaq.html'),
GLogos = Google +'logos/',