Skip to content

Instantly share code, notes, and snippets.

View rafamoreira's full-sized avatar
:shipit:

Rafael Moreira rafamoreira

:shipit:
View GitHub Profile
@rafamoreira
rafamoreira / example.html
Created May 2, 2013 18:32
Bootstrap tabs with ajax
<ul id="MainTabs" class="nav nav-tabs">
<li><a data-target="#apple" data-toggle="tab" href="/apple.html">apple</a></li>
<li><a data-target="#banana" data-toggle="tab" href="/banana.html">banana</a></li>
<li><a data-target="#cherry" data-toggle="tab" href="/cherry.html">cherry</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane" id="apple">Loading...</div>
<div class="tab-pane" id="banana">Loading...</div>
<div class="tab-pane" id="cherry">Loading...</div>
@rafamoreira
rafamoreira / active_admin.css.sass
Created May 23, 2013 11:19 — forked from artofhuman/active_admin.css.sass
active_admin with ckeditor workaround
@import "active_admin/mixins"
@import "active_admin/components/links"
body
@include global-reset
@import "active_admin/typography"
@import "active_admin/header"
@import "active_admin/forms"
@import "active_admin/components/comments"
@import "active_admin/components/flash_messages"
Configurar Vono no X-Lite Beta 4.0 for Mac:
1) Abra "Preferences"
2) Vá em "Accounts"
3) Na aba General, preencha:
User Details:
User ID: [seu login]
Domain: vono.net.br
Password: [sua senha]
Display name: [seu login]
@rafamoreira
rafamoreira / jekyll-post
Created August 26, 2013 06:35
A post generator for jekyll
#!/usr/bin/python
"""
jekyll-post - this is a simple script that will create and initialize a new
Jekyll post file. The default is a markdown file (.md) and the yaml options
listed below will be part of the initialization.
jekyll-post [-w] [-d date] [title]
title the title of the post wrapped in quotes, e.g. "post title here"
require 'cgi'
require 'digest/md5'
require 'net/https'
require 'uri'
module Jekyll
class GistTag < Liquid::Tag
def initialize(tag_name, text, token)
super
@text = text
@rafamoreira
rafamoreira / folha.snob
Last active December 25, 2015 04:39
Block Comments on folha.com.br
{
"id": "[email protected]",
"label": "folha",
"url": "^https?://www1\\.folha\\.uol\\.com\\.br/.*$",
"dynamic": false,
"allCommentsSelector": "#articleComments",
"commentContainerSelector": ".comment_li",
"commentTextSelector": "p"
}
@rafamoreira
rafamoreira / LaunchSites.cfg
Created October 15, 2017 02:40
KSCSwitcher with Alcantara - BR launch base
@KSCSWITCHER:FOR[RealSolarSystem]
{
// Please keep this list alphabetically sorted.
// The launch sites in this list are historical or planned orbital launch sites.
// Launch site displayName should be [ISO 3166-1 alpha-2 code of current country] - Common Name,
// For technical reasons unicode support is poor; site names in non-latin scripts should be given their
// traditional English name, or if none exists, the English romanization of their name.
// Examples:
// FR - Kourou, not FR - Centre Spatial Guyanais (full name),
// DZ - Hammaguir, not FR - Hammaguir (former country), DZ - Centre interarmées d'essais d'engins spéciaux de Hammaguir B2 (full name)
@rafamoreira
rafamoreira / RemoteTech_Settings.cfg
Created October 15, 2017 03:21
Remote Tech settings for RSS with Alcantara Base
// ==================================================
// RSS tracking stations.
// Red: Uncategorized
// Green: ESTRACK / DSA
// Blue: DSN
// Yellow: Launch sites
// Magenta: MSFN
// The methodology for range here is game-y, but then RT2 is game-y to begin with.
@rafamoreira
rafamoreira / VM-XServer-Instructions.md
Created March 25, 2018 02:13 — forked from rpavlik/VM-XServer-Instructions.md
Cygwin X for a virtual machine

Using Cygwin X as a display for a Linux VM without SSH overhead

This is primarily for my own record and knowledge. If it helps you, great! If it breaks something, don't say I didn't warn you - this is just documentation of what I did to get this to work at the time I wrote this on one particular machine.

Environment

  • I have a 64-bit cygwin install in c:\cygwin64 (possible in 32-bit too, I just messed up that install and it no longer works, so these were tested on my machine in a 64-bit install). I use my Cygwin setup scripts to simplify this part.
  • I'm using VirtualBox on Windows 8.1.
    • Importantly (at least for VirtualBox), I added a "host-only networking" adapter for communication between the guest (VM) and host machine - this seems to be required.
  • Totally optional but useful part of my setup: I'm using VBoxHeadlessTray to be able to easily have my virtual machine running without taking
@rafamoreira
rafamoreira / easy_rails_deployment_with_capistrano.md
Created March 25, 2018 08:57
Easy Rails deployment with Capistrano

Goals of this tutorial:

  • deploy a new Rails app with capistrano
  • make it fast (total process takes less than 5 minutes)
  • make it simple (no unecessary config)
  • manual ssh to the server not required

Rails application stack:

  • nginx
  • unicorn
  • postgresql