Skip to content

Instantly share code, notes, and snippets.

@marcialca
marcialca / config.rb
Last active December 30, 2015 18:09 — forked from nathansmith/config.rb
preferred_syntax = :sass
http_path = '/'
css_dir = 'assets/stylesheets'
sass_dir = 'assets/sass'
images_dir = 'assets/images'
javascripts_dir = 'assets/javascripts'
relative_assets = true
line_comments = true
# output_style = :compressed
# sass_options = {:sourcemap => true}
@marcialca
marcialca / seo.html
Created August 11, 2013 19:13
SEO for JS SPA
<meta name="fragment" content="!">
@marcialca
marcialca / yeoman-jade
Created July 26, 2013 07:00
Jade Support for Yeoman
Install grunt-contrib-jade
(sudo) npm install grunt-contrib-jade --save-dev
Create the JADE Task:
jade: {
dist: {
options: {
pretty: true
},
@marcialca
marcialca / reset
Created June 18, 2013 05:25
Reset MySQL root Password
Paramos el servidor MySQL:
sudo /etc/init.d/mysql stop
Arrancamos la configuración de mysqld:
sudo mysqld --skip-grant-tables &
Login en MySQL como root:
mysql -u root mysql
Cambiamos la contraseña por nuestra NuevaContraseña:
@marcialca
marcialca / gzip
Created June 8, 2013 06:29
Enable GZIP Wordpress
#Gzip
<ifmodule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript text/javascript
</ifmodule>
#End Gzip
@marcialca
marcialca / featured
Created June 8, 2013 06:27
Add Featured Image to Wprdpress
@marcialca
marcialca / new_gist_file
Created June 8, 2013 06:26
Wordpress Sites Feeds
Main – site.com/feed
Main comments – site.com/comments/feed
Post comments – site.com/post-name/feed
Categories & tags – site.com/category/categoryname/feed or site.com/tag/tagname/feed
You can also include / exclude categories like this – site.com/?cat=42,25,17&feed=rss2 or this site.com/?cat=-123&feed=rss2
Author – site.com/author/authorname/feed/
@marcialca
marcialca / $.js
Created May 14, 2013 21:36 — forked from yeco/$.js
// Based on https://github.com/james2doyle/saltjs
window.$ = function(s) {
return document[{
'#': 'getElementById',
'.': 'getElementsByClassName',
'@': 'getElementsByName',
'=': 'getElementsByTagName'}[s[0]]
|| 'querySelectorAll'](s.slice(1))
};
@marcialca
marcialca / flag
Created May 10, 2013 05:19
Flag & Media Object
/* IE8+ */
.flag{
display:table;
width:100%;
}
.flag__image,
.flag__body{
display:table-cell;
@marcialca
marcialca / query_post
Created May 10, 2013 05:10
Create and Show Taxonomies on Wordpress
/* show the taxonomies per post */
<?php echo get_the_term_list($post->ID, 'people', 'People: ', ', ', ''); ?>