Skip to content

Instantly share code, notes, and snippets.

View iulia-codes's full-sized avatar

Julia iulia-codes

View GitHub Profile
@iulia-codes
iulia-codes / README.md
Created May 27, 2016 16:42 — forked from fnichol/README.md
Download a cacert.pem for RailsInstaller

Why?

There is a long standing issue in Ruby where the net/http library by default does not check the validity of an SSL certificate during a TLS handshake. Rather than deal with the underlying problem (a missing certificate authority, a self-signed certificate, etc.) one tends to see bad hacks everywhere. This can lead to problems down the road.

From what I can see the OpenSSL library that Rails Installer delivers has no certificate authorities defined. So, let's go fetch some from the curl website. And since this is for ruby, why don't we download and install the file with a ruby script?

Installation

The Ruby Way! (Fun)

@iulia-codes
iulia-codes / howto-manually-add-trust-cert-to-rubygems.md
Created May 27, 2016 17:19
Workaround RubyGems' SSL errors on Ruby for Windows (RubyInstaller)

SSL upgrades on rubygems.org and RubyInstaller versions

UPDATE 2014-12-21: RubyGems 1.8.30, 2.0.15 and 2.2.3 have been released. It requires manual installation, please see instructions below.


Hello,

If you reached this page, means you've hit this SSL error when trying to

@iulia-codes
iulia-codes / actions.ts
Created February 2, 2018 11:31 — forked from anonymous/actions.ts
Error handling in redux with sagas
import {
SHOULD_ASK_BACKEND_SOMETHING,
DID_ASK_BACKEND_SOMETHING,
DID_FAIL_TO_ASK_BACKEND_SOMETHING,
} from './constants';
export const shouldAskBackendSomething = (payload) => ({
type: SHOULD_ASK_BACKEND_SOMETHING,
payload,
});
@iulia-codes
iulia-codes / SimpleStateless.tsx
Created September 21, 2018 14:04 — forked from mikebridge/SimpleStateless.tsx
React TypeScript Stateless Component Examples
// various examples of typescript stateless component declarations
import * as React from "react";
import {MouseEventHandler} from "react";
////////////////
interface IVerboseStatelessComponentProps extends React.HTMLProps<JSX.Element> {
myvar: string;
onClick: () => void;
@iulia-codes
iulia-codes / template-literals-1-if-statements.js
Created December 4, 2018 14:38 — forked from wiledal/template-literals-1-if-statements.js
Template Literal Examples: if-statement
/*
Template literals if-statement example
Using a single-line conditional, we can create an if-statements within template literals.
*/
function makeHTML(title) {
return `
${title ? `
This element has a title, and it is "${title}"
` : `
@iulia-codes
iulia-codes / bronto.ts
Last active September 4, 2020 14:59 — forked from kitsonk/bronto.ts
Example Deno Static Server
//hello RheinNeckarJS
import {
green,
cyan,
bold,
yellow,
red
} from "https://deno.land/std/examples/colors.ts"; //<-- update this URL