Skip to content

Instantly share code, notes, and snippets.

View mklemme's full-sized avatar
🤓
Always be creating

Myk Klemme mklemme

🤓
Always be creating
View GitHub Profile
@maxivak
maxivak / readme.md
Last active January 12, 2024 06:53
Integrating Gem/Engine and Main Rails App
@kenwebb
kenwebb / xholonWorkbook.xml
Last active November 25, 2021 01:47
Human Face Generator
<?xml version="1.0" encoding="UTF-8"?>
<!--Xholon Workbook http://www.primordion.com/Xholon/gwt/ MIT License, Copyright (C) Ken Webb, Fri Jan 27 2017 10:35:21 GMT-0500 (EST)-->
<XholonWorkbook>
<Notes><![CDATA[
Xholon
------
Title: Human Face Generator
Description:
Url: http://www.primordion.com/Xholon/gwt/
@furzeface
furzeface / GitHub Gist Basic Styles
Created December 12, 2013 19:13
GitHub Gists default CSS selectors and base styles.
.gist {
color: #000;
.render-container {
.render-viewer-error,
.render-viewer-fatal,
.octospinner {
display: none;
}
}
@maxivak
maxivak / rails-www-redirect-routes
Last active April 28, 2021 12:17
Redirect from WWW to a non-WWW version of site in Rails.details:http://maxivak.com/redirect-from-www-to-a-non-www-version-of-site-in-rails/
Foo::Application.routes.draw do
constraints(host: /^www\./i) do
match '(*any)' => redirect { |params, request|
URI.parse(request.url).tap { |uri| uri.host.sub!(/^www\./i, '') }.to_s
}
end
# other routes
@tomas-stefano
tomas-stefano / Capybara.md
Last active May 21, 2024 02:09
Capybara cheatsheet

Capybara Actions

# Anchor
click_link 'Save'

# Button
click_button 'awesome'

# Both above
@stevenharman
stevenharman / defaults.rb
Last active July 7, 2021 14:36
A subtle difference between Ruby's Hash.fetch(:key, :default) vs. (Hash[:key] || :default)
h = {
'a' => :a_value,
'b' => nil,
'c' => false
}
h.fetch('a', :default_value) #=> :a_value
h.fetch('b', :default_value) #=> nil
h.fetch('c', :default_value) #=> false
h.fetch('d', :default_value) #=> :default_value
@joshuapekera
joshuapekera / Asynchronous Facebook Twitter Google buttons and Google Analytics Social Tracking
Created May 3, 2012 00:49
This .js file will render HTML5 social buttons asynchronously as well as bind callbacks to Google Analytics. Supports Facebook and Twitter interaction tracking and Facebook Comment tracking.
// Facebook Social Tracking
window.fbAsyncInit = function() {
FB.init({
appId : '123456789', // ENTER your FB App ID
channelUrl : 'WWW.YOUR_DOMAIN.COM', // Channel File
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
@oodavid
oodavid / README.md
Last active June 12, 2024 00:28 — forked from aronwoost/README.md
Deploy your site with git

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/