Skip to content

Instantly share code, notes, and snippets.

View pferreir's full-sized avatar
💭
Hacking

Pedro Ferreira pferreir

💭
Hacking
View GitHub Profile
@mairh
mairh / Redux-Form-Semantic-UI-React
Last active August 12, 2021 23:03
Semantic-UI-React form validation using redux-form example
// semantic-ui-form.js
import React from 'react';
import PropTypes from 'prop-types';
import { Form, Input } from 'semantic-ui-react';
export default function semanticFormField ({ input, type, label, placeholder, meta: { touched, error, warning }, as: As = Input, ...props }) {
function handleChange (e, { value }) {
return input.onChange(value);
}
#!/bin/bash
# tmux-smartsplit
# open a new tmux (split-)window which will automatically
# continue the existing ssh session if one exists
SIP=$(tmux display-message -p "#S:#I:#P")
PTY=$(tmux server-info |
egrep flags=\|bytes |
awk '/windows/ { s = $2 }
/references/ { i = $1 }