Skip to content

Instantly share code, notes, and snippets.

View phirefly's full-sized avatar

Raphael (Raphy) Villas phirefly

View GitHub Profile
@phirefly
phirefly / gist:5995809
Created July 14, 2013 20:21
Jekyll: generate pages by weight (1..10) and group 'topnavigation'
<ul id="top-nav">
{% for weight in (1..10) %}
{% for node in site.pages %}
{% if node.group == 'topnavigation' %}
{% if node.weight == weight %}
{% if page.url == node.url %}
<li class="active"><a href="{{site.baseurl}}{{node.url}}" class="active">{{node.title}}</a></li>
{% else %}
@phirefly
phirefly / topnav-style
Last active December 20, 2015 00:49
CSS topnav
ul#top-nav {
display: inline-block;
color: #fff;
margin: 0;
padding-left: 0;
padding-top: auto;
padding-bottom: auto;
}
ul#top-nav a {
@phirefly
phirefly / gist:6440520
Last active December 22, 2015 07:49
sublime: user defaults
{
"color_scheme": "Packages/Color Scheme - Default/Solarized2Bd(Light).tmTheme",
"font_face": "Anonymous Pro",
"font_size": 15.0,
"highlight_line": true,
"ignored_packages":
[
],
"line_padding_top": 3,
"tab_size": 2,
@phirefly
phirefly / sublime-key-repeat-console-command
Last active December 22, 2015 07:58
Lion: Repeat key in sublime text 2 In Lion, holding down a key won't repeat it, but will instead show a popup menu to select between character variations. This doesn't work well with command mode, so you may want to disable it. This can be done via entering this at the terminal:
defaults write com.sublimetext.2 ApplePressAndHoldEnabled -bool false
@phirefly
phirefly / gist:7120713
Created October 23, 2013 15:19
Basic bootstrap 3 nav in haml
%nav.navbar.navbar-default{role: "navigation"}
/ Brand and toggle get grouped for better mobile display
.navbar-header
%button.navbar-toggle{"data-target" => ".navbar-ex1-collapse", "data-toggle" => "collapse", type: "button"}
%span.sr-only Toggle navigation
%span.icon-bar
%span.icon-bar
%span.icon-bar
%a.navbar-brand{href: "#"} Brand
/ Collect the nav links, forms, and other content for toggling
10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.90 Safari/537.36" 10.10.100.87:35390 x_forwarded_for:"159.142.71.6" vcap_request_id:a4ad219a-a4a1-4199-7e42-f02bd9038549 response_time:0.444874612 app_id:1c023628-835f-42b6-aca1-f1bd58dec4d3
2015-05-08T11:24:31.09-0500 [App/0] OUT Rendered ncr/_proposal_list.html.erb (423.9ms)
2015-05-08T11:24:31.09-0500 [App/0] OUT Rendered proposals/index.html.erb within layouts/application (427.0ms)
2015-05-08T11:24:31.09-0500 [App/0] OUT Completed 500 Internal Server Error in 431ms
2015-05-08T11:24:31.10-0500 [App/0] OUT ActionView::Template::Error (undefined method `total_price' for nil:NilClass):
2015-05-08T11:24:31.10-0500 [App/0] OUT 19: <tr>
2015-05-08T11:24:31.10-0500 [App/0] OUT 20: <td class="sixth"><a href="<%= proposal_url(proposal) %>"><%= proposal.public_identifier %></a></td>
2015-05-08T11:24:31.10-0500 [App/0] OUT 21: <td class="first"><a href="<%= proposal_url(proposal) %>"><%=
@phirefly
phirefly / sublime-font-settings
Created July 12, 2015 03:49
Sublime: font settings
{
"color_scheme": "Packages/Color Scheme - Default/Cobalt.tmTheme",
"font_face": "Anonymous Pro",
"font_size": 18.0,
"highlight_line": true,
"ignored_packages":
[
],
"line_padding_top": 3,
"tab_size": 2,
@phirefly
phirefly / sublime-font-settings-fira-mono
Created July 12, 2015 03:52
Sublime: Font settings with Fira Mono
{
"color_scheme": "Packages/Color Scheme - Default/Cobalt.tmTheme",
"font_face": "Fira Mono",
"font_size": 18.0,
"highlight_line": true,
"ignored_packages":
[
],
"line_padding_top": 0,
"tab_size": 2,
@phirefly
phirefly / sublime-user-prefs-20150805.json
Last active September 6, 2015 04:54
sublime-user-prefs-20150805
{
"color_scheme": "Packages/Color Scheme - Default/Solarized2Bd(Light).tmTheme",
"font_face": "Fantasque Sans Mono",
"font_size": 16.0,
"highlight_line": true,
"hot_exit": false,
"ignored_packages":
[
],
"line_padding_top": 3,
@phirefly
phirefly / #101217754-qa
Created September 14, 2015 16:22
101217754-qa
irb(main):054:0> p.public_id
=> "FY15-399"
irb(main):055:0> p.client_data.created_at = 17.days.from_now
=> Thu, 01 Oct 2015 16:18:55 UTC +00:00
irb(main):056:0> p.public_identifier
=> "FY16-399"