Skip to content

Instantly share code, notes, and snippets.

View rg-najera's full-sized avatar

Rodrigo Garcia rg-najera

View GitHub Profile
[
{
"country": "Ireland",
"created_at": "2013-09-19T01:29:12Z",
"description": "Europe",
"id": "ed30241c-ed8c-4bb6-9714-61953675d0b4",
"locale": "Dublin",
"name": "eu",
"private_capable": false,
"provider": {
"*":
"atom-ide-ui":
"atom-ide-code-format":
formatOnSave: true
"atom-package-deps":
ignored: [
"linter-tidy"
"linter-sass-lint"
"linter-scss-lint"
"linter-scss-lint"
@rg-najera
rg-najera / comment_cache_for_seo.php
Last active January 11, 2018 16:45
Cache Comment List for Disqus
<?php
/*
* Adds Author Box Extending Qode
*
*/
// Allow HTML in author bio section
function abtw_comment_cache(){
$cache_key = '_abtw_comment-cache-key';
@rg-najera
rg-najera / wp-author-import-auto-select.js
Created July 5, 2017 20:44 — forked from webercoder/wp-author-import-auto-select.js
Auto-select authors for posts during WordPress import. They must already be assigned to the project. Enable jQuery in a plugin or functions.php, and paste this in the browser console.
(function($){
$('#authors li').each(function(key, value) {
var name = $(this).children('strong').first().html();
var re = /\s\([^\)]+\)/gi;
name = name.replace(re, '');
$(this).find('select').first().children('option').each(function(){
if ($(this).html() == name) {
console.log('Comparing ' + $(this).html() + ' to ' + name + ".\n");
$(this).attr('selected', 'selected');
@rg-najera
rg-najera / .gitconfig
Created July 1, 2016 20:10
Gitconfig with Aliases
[core]
filemode = false
excludesfile = /Users/sugarskull/.gitignore_global
pager = less -r
whitespace = trailing-space,space-before-tab
[color]
ui = auto
branch = auto
diff = true
interactive = auto
@rg-najera
rg-najera / README.md
Created June 15, 2016 01:32 — forked from jimothyGator/README.md
Nginx configuration for Mac OS X with Homebrew, using sites-enabled directory.
mkdir -p /usr/local/etc/nginx/sites-{enabled,available}
cd /usr/local/etc/nginx/sites-enabled
ln -s ../sites-available/default.conf
ln -s ../sites-available/default-ssl.conf

File locations:

  • nginx.conf to /usr/local/etc/nginx/
  • default.conf and default-ssl.conf to /usr/local/etc/nginx/sites-available
  • homebrew.mxcl.nginx.plist to /Library/LaunchDaemons/
*** LOCAL GEMS ***
actionmailer (4.1.9)
actionpack (4.1.9)
actionview (4.1.9)
activemodel (4.1.9)
activerecord (4.1.9)
activeresource (4.0.0)
activesupport (4.1.9)
acts-as-taggable-on (3.5.0)
source 'https://rubygems.org'
ruby '2.2.2'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.9'
gem 'sprockets-rails', '~> 2.1.4', :require => 'sprockets/railtie'
# Using postgresql as the database for ActiveRecord
gem 'pg'
@rg-najera
rg-najera / deploy.rb
Last active July 11, 2022 00:32
Bedrock / Sage Capistrano Deploy
set :repo_url, '[email protected]:Design-Collective/some-repo.git'
set :application, 'the-app-name.com'
set :theme_name, 'sage'
# Branch options
# Prompts for the branch name (defaults to current branch)
#ask :branch, -> { `git rev-parse --abbrev-ref HEAD`.chomp }
# Hardcodes branch to always be master
# This could be overridden in a stage config file
@rg-najera
rg-najera / gist:9a317e9a2f2a5ae1fe42
Last active August 29, 2015 14:16
Bootstrap Carousel Fade - SCSS
// Carousel Styles
.carousel {
height: 520px;
min-height: 520px;
@media (max-width: $screen-xs-max) {
& {
}
}
.carousel-inner {