Skip to content

Instantly share code, notes, and snippets.

@jmn
jmn / ssh.ps
Created January 11, 2021 02:53
How to fix VS Code Git SSH authentication in Windows
# https://snowdrift.tech/cli/ssh/git/tutorials/2019/01/31/using-ssh-agent-git-windows.html
[Environment]::SetEnvironmentVariable("GIT_SSH", "$((Get-Command ssh).Source)", [System.EnvironmentVariableTarget]::User)
@jmn
jmn / react.sh
Last active September 19, 2020 18:52
React latest - 2020 (CRA 4, React 17)
npx create-react-app@next --scripts-version=@next --template=typescript@next my-ts-app
yarn add [email protected]
yarn add [email protected]
@jmn
jmn / download.ex
Created September 19, 2019 20:00
Concurrent elixir downloader with some fault toleration
defmodule Dl do
require Logger
def download(url) do
case HTTPoison.get(url) do
{:ok, response} ->
case response.status_code do
200 ->
{:ok, response.body}
@jmn
jmn / download.ex
Created September 19, 2019 17:46
Minimal Elixir Concurrent Downloader
defmodule Dl do
def download(url) do
case HTTPoison.get(url) do
{:ok, response} ->
case response.status_code do
200 ->
{response.body}
end
end
end
@jmn
jmn / config.yml
Last active May 27, 2023 04:20
CircleCI build and deploy via Rsync SSH in two steps
version: 2.1
executors:
my-executor:
docker:
- image: circleci/node:8
working_directory: /tmp
jobs:
build:
@jmn
jmn / FormDialog.jsx
Created February 23, 2019 12:02
multi-stage react material-ui modal
import React from "react";
import Button from "@material-ui/core/Button";
import TextField from "@material-ui/core/TextField";
import Dialog from "@material-ui/core/Dialog";
import DialogActions from "@material-ui/core/DialogActions";
import DialogContent from "@material-ui/core/DialogContent";
import DialogContentText from "@material-ui/core/DialogContentText";
import DialogTitle from "@material-ui/core/DialogTitle";
import Parser from "rss-parser";
import CircularProgress from "@material-ui/core/CircularProgress";
@jmn
jmn / AddFeed.jsx
Created February 20, 2019 23:06
AddFeed
import React, { useState } from "react";
import Parser from "rss-parser";
import { Form, FormGroup, Label, Input } from "reactstrap";
const getFeedTitle = feedUrl => {
const foo = async () => {
try {
const parser = new Parser();
const CORS_PROXY = "https://cors-anywhere.herokuapp.com/";
let feed = await parser.parseURL(CORS_PROXY + feedUrl);
@jmn
jmn / c1.jsx
Created February 20, 2019 23:04
C1
import React from "react";
import Button from "@material-ui/core/Button";
import TextField from "@material-ui/core/TextField";
import Dialog from "@material-ui/core/Dialog";
import DialogActions from "@material-ui/core/DialogActions";
import DialogContent from "@material-ui/core/DialogContent";
import DialogContentText from "@material-ui/core/DialogContentText";
import DialogTitle from "@material-ui/core/DialogTitle";
import Slide from "@material-ui/core/Slide";
import FormDialog2 from "./FormDialog2";
@jmn
jmn / spring.jsx
Created February 4, 2019 13:16
Why does this not animate?
import React, { Component } from "react";
import { Transition } from "react-spring";
import "./App.css";
class App extends Component {
state = {
items: [1, 2, 3],
toggleDiv: false
};
render() {
@jmn
jmn / foo.jsx
Created January 26, 2019 11:35
react component animations react-spring
import React, { Component } from "react";
import "./App.css";
import firebase from "./config/fbConfig";
import { Spring } from "react-spring";
class App extends Component {
constructor() {
super();
this.state = {
currentItem: "",