Skip to content

Instantly share code, notes, and snippets.

@richseviora
richseviora / override_driver.rb
Created December 15, 2016 22:26
Capybara/Selenium Fix for Rubymine Debugging w/ Ruby 2.3+
# This OverrideDriver class is used to override the +open_timeout+ property Selenium's default HTTP driver.
# This is necessary to support debugging in Rubymine because when the process is stopped on the breakpoint,
# any new threads are not scheduled.
# This is an issue in Ruby 2.3+ because the Net::HTTP#initialize method now defaults the open_timeout property
# to 60 (seconds), as opposed to 0 previously. A non-zero/nil value executes the connection in a new thread
# (see +Net::HTTP#connect+).
# === Change Notes
#
# * Setting timeout directly does not work, the read_timeout period needs to remain at its current setting.
# A setting of 0 prevented pages from opening successfully.
@richseviora
richseviora / ExtendedTabbedPageRenderer.cs
Created May 9, 2016 17:52
Xamarin Forms - iOS TabbedPage Tab Font Overrides
using System;
using {AppName}.iOS.Renderers;
using UIKit;
using Xamarin.Forms;
using Xamarin.Forms.Platform.iOS;
using {AppName}.iOS.Views;
[assembly: ExportRenderer(typeof(TabbedPage), typeof(ExtendedTabbedPageRenderer))]
namespace {AppName}.iOS.Renderers
{
@richseviora
richseviora / AppPickerExtensions.cs
Last active July 29, 2020 14:38
Xamarin UI Test Date/Time Picker Extensions
// Tested with Xamarin.UITest V1.3.7;
using System;
using Xamarin.UITest;
namespace {APPNAMEHERE}.UITests
{
/// <summary>
/// This extension class extends the <see cref="IApp"/> interface to add extension methods for selecting values from the default Date/Time pickers in iOS and Android.
/// </summary>
public static class AppPickerExtensions
@richseviora
richseviora / gist:c18d70e27fb8e9500ffb
Last active February 1, 2016 02:26
Creamy Cajun Chicken
Ingredients
- Chicken Prep
- 0.8 kg chicken breast
- 4 tbsp. cajun seasoning
- 3 tbsp. coconut oil
- Sauce
- 2 tbsp. cajun seasoning
- 2 tsp. tapioca starch
- 1 can coconut milk
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnitsExample;
namespace Program
{
class Program
@richseviora
richseviora / client_install.rb
Last active June 22, 2016 20:57
Opsworks Override for PostgreSQL Installation
# Override for Opsworks as a result of bug causing postgres8 install to fail.
# Should be placed in the following path from the custom cookbook repository root:
# /opsworks_postgresql/recipes/client_install.rb
#
# Don't forget your standard metadata file in /opsworks_postgresql/metadata.rb
#
# For issue https://github.com/aws/opsworks-cookbooks/issues/347
package "postgresql-devel" do
package_name value_for_platform(