This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package rules; | |
import com.google.common.collect.Lists; | |
import com.google.common.collect.Maps; | |
import com.spotify.docker.client.DefaultDockerClient; | |
import com.spotify.docker.client.DockerClient; | |
import com.spotify.docker.client.DockerException; | |
import com.spotify.docker.client.messages.ContainerConfig; | |
import com.spotify.docker.client.messages.ContainerCreation; | |
import com.spotify.docker.client.messages.HostConfig; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://explainshell.com/ | |
http://www.cyberciti.biz/faq/linux-unix-bsd-xargs-construct-argument-lists-utility/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Example Usage: gpb develop | |
# Removes any branches that were already merged into develop | |
gpb() { | |
BRANCH=$1 | |
BRANCHES_TO_CLEAN=$(git branch --merged=$BRANCH | grep -v $BRANCH) | |
echo "Branches that have been merged to develop:" | |
echo $BRANCHES_TO_CLEAN | |
read -q "REPLY?Remove branches? (y/n)" | |
echo "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Loading Animation Snippet | |
*/ | |
.loading { | |
color: transparent; | |
background: linear-gradient(100deg, #eceff1 30%, #f6f7f8 50%, #eceff1 70%); | |
background-size: 400%; | |
animation: loading 1.2s ease-in-out infinite; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const CustomInput2 = ({ onChange }) => { | |
const handleChange = (e) => { | |
const newValue = getParsedValue(e.target.value); | |
onChange(newValue); | |
}; | |
return ( | |
<Input onChange={handleChange} /> | |
) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState } from 'react'; | |
const Form = () => { | |
const [name, setName] = useState(''); | |
const handleChange = e => { | |
setName(e.target.value); | |
} | |
const handleSubmit = () => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState } from 'react'; | |
const Form = () => { | |
const [name, setName] = useState(''); | |
const handleChange = e => { | |
setName(e.target.value); | |
} | |
const handleSubmit = e => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState, useEffect } from 'react' | |
import { fetchUserAction } from '../api/actions.js' | |
const UserContainer = () => { | |
const [uset, setUser] = useState(null); | |
const handleUserFetch = async () => { | |
const result = await fetchUserAction(); | |
setUser(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState, useEffect, useCalllback } from 'react' | |
import { fetchUserAction } from '../api/actions.js' | |
const UserContainer = () => { | |
const [uset, setUser] = useState(null); | |
const handleUserFetch = useCalllback(async () => { | |
const result = await fetchUserAction(); | |
setUser(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState } from "react"; | |
import PropTypes from "prop-types"; | |
export const UserCard = ({ user }) => { | |
return ( | |
<ul> | |
<li>{user.name}</li> | |
<li>{user.age}</li> | |
<li>{user.email}</li> | |
</ul> |