Skip to content

Instantly share code, notes, and snippets.

@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(
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnitsExample;
namespace Program
{
class Program
@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
@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 / 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 / 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 / parsley.d.ts
Last active February 17, 2017 21:46
Working Parsley definition file
declare namespace parsley {
type RequirementValues = 'string' | 'integer' | 'number' | 'regexp' | 'boolean';
/**
* A ValidatorReturn should be one of the following:
*
* - True - is valid.
* - False - is not valid.
* - Error string or any other value - is not valid.
* - JQueryPromise returning one of the above.
@richseviora
richseviora / jest.test.ts
Created February 22, 2017 20:33
Twilio Example
namespace Twilio {
Device = {
setup: function () { },
ready: function () { },
offline: function () { },
incoming: function () { },
connect: function (params): Twilio.Connection { return null },
error: function () { }
}
}
@richseviora
richseviora / creamy_cheesecake.txt
Created April 9, 2017 17:47
Creamy Cheesecake Recipe
Ingredients
* Crust
* 1 1/4 cups graham cracker crumbs
* 1/4 cup white sugar
* 1 teaspoon ground cinnamon
* 1/3 cup butter, melted
* Sauce
* 20 oz packages pitted dark sweet cherries.
* 3 tbsp cornstarch
* 2 cup sugar.
@richseviora
richseviora / digestor_patch.rb
Created April 26, 2017 22:15
Patching ActionView::Digestor.tree to address cross-format dependency resolution.
module ActionView
class Digestor
class << self
def tree(name, finder, partial = false, seen = {})
logical_name = name.gsub(%r|/_|, "/")
options = {}
options[:formats] = [finder.rendered_format] if finder.rendered_format
options[:format].push(:html, :json) if finder.rendered_format == :js