Skip to content

Instantly share code, notes, and snippets.

View leompeters's full-sized avatar
😎
...

Leo M. Peters leompeters

😎
...
View GitHub Profile
@vvo
vvo / test.yml
Last active August 21, 2020 11:54
Rails and PostgreSQL setup for GitHub actions (CI)
name: Test
on: [push]
jobs:
build:
runs-on: ubuntu-latest
# Similar to docker-compose.yml but not the same, 🤷‍♂️
services:
@leompeters
leompeters / abstract_interface.rb
Last active December 13, 2018 18:55
Building Interfaces and Abstract Classes in Ruby.
# Object Interface in Ruby.
# Suggestion of implementation for object-oriented interfaces.
#
# ===== Example
#
# bike = AcmeBicycle.new
# bike.change_gear(1)
# # => AbstractInterface::InterfaceNotImplementedError: AcmeBicycle needs to implement 'change_gear' for interface Bicycle!
#
# See:: http://www.metabates.com/2011/02/07/building-interfaces-and-abstract-classes-in-ruby
1. Highlight a recommended option,

2. Allow users to switch currency (€/$/£)

3. Allow users to switch pricing monthly/yearly

4. Keep the entire pricing plan area clickable

5. Use slider to calculate how much a user would save

6. Provide free first month for good engagement

7. Prominently highlight testimonials prominently

8. Repeating call to action on top and bottom

9. Sell benefits instead of features

10. Indicate that users can cancel any time

@leompeters
leompeters / git_patterns.md
Last active May 7, 2020 18:44
Some rules to use on your git commit messages.

Git Patterns

Some rules to use on your git commit messages.

Commit Messages:

[jira issue] #[action] : [issue description]

Actions:

@bhelx
bhelx / test.php
Last active September 16, 2017 12:29
TLS Low Level Testing. You should expect to see it print TLS version 1.2.
<?php
// This example is for testing php with libcurl
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.howsmyssl.com/a/check");
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, TRUE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
@gonzalolarralde
gonzalolarralde / tvos_prohibited.md
Last active December 24, 2019 16:19
Classes and Methods prohibited to tvOS
$ grep -lR "__TVOS_PROHIBITED" . | while read L; do echo "## $L"; echo "\`\`\`obj-c"; grep "__TVOS_PROHIBITED" "$L"; echo "\`\`\`"; echo; done

./AVFoundation.framework/AVAudioSession.h

AVAudioSessionPortOverrideSpeaker __TVOS_PROHIBITED = 'spkr'

AVAudioSessionCategoryOptionAllowBluetooth	__TVOS_PROHIBITED		= 0x4,
AVAudioSessionCategoryOptionDefaultToSpeaker __TVOS_PROHIBITED		= 0x8,
@chrisjacob
chrisjacob / Gemfile
Last active February 6, 2020 08:26
Simple guide to integrating Pages v1.0.0 with Rails v4.1.1
gem 'rails', '4.1.1'
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
gem 'jquery-turbolinks'
# Gems for twitter LESS -> CSS and JS support
gem 'execjs'
@leompeters
leompeters / .belanton_rubymine_livetemplates
Last active March 7, 2019 20:18
RubyMine Live Templates for commented items at Belanton Team.
You can use these settings on your RubyMine [http://rubymine.org]. Here are some RubyMine Live Templates.
@sabind
sabind / README.md
Last active May 5, 2016 18:45
Adding 'grunt test' to SailsJS 0.10.x using grunt and mocha

This is an addition to a full guide on SailsJS + Mocha, but updated for SailsJS 0.10.x

The guide does not belong to me, only this change to support SailsJS 0.10.x using code originally found in the guide written by it's author.