Skip to content

Instantly share code, notes, and snippets.

View jalcine's full-sized avatar
💭
Decentralize and democratize the Web.

Jacky Alciné jalcine

💭
Decentralize and democratize the Web.
View GitHub Profile
factory :user do
name "Jessie Pinkman"
email
password "secret"
password_confirmation "secret"
factory :group_admin, parent: :user do
ignore do
group = nil
end
module ApplicationHelper
def is_in_beta?
Settings.toggles.in_beta == true
end
['flash_gordon', 'navigation', 'footer', 'header'].each do | section |
module_eval <<-METHODS, __FILE__, __LINE__ +1
def #{section}_visible?
@#{section}_visible = true if @#{section}_visible.nil?
@#{section}_visible

Using better_errors on Ubuntu with SublimeText 2

After I installed the fantastic better_errors gem, I was disappointed to notice that linking to your text editor doesn't work correctly on Ubuntu (at least, it didn't for me). Here's how I fixed it.

First, create a new desktop entry:

# /usr/share/applications/subl-urlhandler.desktop
module AuthenticationSteps
step 'I sign in with :provider' do | provider |
expect(find("a.#{provider.downcase}")).to_not be_nil
find("a.#{provider.downcase}").trigger 'click'
end
step 'I sign up with :provider' do | provider |
expect(find("a.#{provider.downcase}")).to_not be_nil
find("a.#{provider.downcase}").trigger 'click'
end
Feature: Events
Background:
Given a host is signed in
Scenario: Saves a new event
When I go to the new events page
And I set the event's title with "Captain Underpants: The Reunion"
And I set the event's description to some placeholder text
And I populate the time range for the event
And I add 30 free tickets to the event named "Early Bird"

Clear Spot 4G Data

So I got tired of having to open http://clearspot/ to check on my router. I busted open the soure code for the landing page and found out the information that I wanted. The primary URI that it uses for polling information is http://192.168.1.1/cgi-bin/webmain.cgi?act=act_network_info if 192.168.1.1 is your go-to admin IP address.

No Phucks

"If Snapchat can exist, why can't this?"

  • Jacky Alciné, 2013
@jalcine
jalcine / README.md
Last active December 28, 2015 16:09
My Opinionated Setup for Rails.

My (Optionated) Rails Template

I use [Rails][] a lot. A bit more than I'd like to confess (is that a bad thing?). This repository is a template I use for most Rails projects since we only have [so many keystrokes before we die][keysleft] so even the rails new command is aliased. Insert Samuel L. Jackson quote here.

Notes

  • This'll work with Rails 3.2 and greater for certain. It may or may not work
@jalcine
jalcine / gist:7527175
Created November 18, 2013 12:43 — forked from dahu/gist:3986511
Large Object Motions:
(
)
{
}
[[
[]
][
]]
[m
usr/bin/konsole
usr/bin/konsoleprofile
usr/lib/kde4/libkonsolepart.so
usr/lib/libkdeinit4_konsole.so
usr/lib/libkonsoleprivate.so
usr/share/applications/kde4/konsole.desktop
usr/share/doc/kde/HTML/en/konsole/common
usr/share/doc/kde/HTML/en/konsole/draganddrop-contextmenu.png
usr/share/doc/kde/HTML/en/konsole/index.cache.bz2
usr/share/doc/kde/HTML/en/konsole/index.docbook