Skip to content

Instantly share code, notes, and snippets.

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 / 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(
@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
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[:formats].push(:html,:json) if finder.rendered_format == :js
if template = finder.disable_cache { finder.find_all(logical_name, [], partial, [], options).first }
@richseviora
richseviora / handler.tsx
Created October 5, 2017 02:56
Handler Allocation Examples
class ParentComponent extends React.Component<any, any>{
render(): JSX.Element {
return (
<div>
<EveryRenderComponent id={1} doTheThing={this.doTheNumberThing} />
<OnMountComponent id={2} doTheThing={this.doTheNumberThing} />
<OnParentComponent id={3} doTheThing={this.doTheDataSetThing} />
</div>
)
@richseviora
richseviora / teriyaki_sauce.md
Last active January 11, 2018 21:11
Teriyaki Sauce Recipe

Ingredients

Base

  • 2 cup white sugar
  • 2 cup soy sauce
  • 1 cup cider vinegar
  • 4 clove garlic minced
  • 2 tsp. ground ginger
  • 1 tsp. black pepper

Thickening

  • 4 tbsp. cornstarch