Skip to content

Instantly share code, notes, and snippets.

View UsmanHaider15's full-sized avatar
🏠
Working from home

Usman Haider UsmanHaider15

🏠
Working from home
View GitHub Profile
import { useState } from "react";
const Switch = ({ test, children }) =>
children.find((child) => child.props.value === test);
function SwitchComponent() {
const [value, setValue] = useState("first");
return (
<div>
<Switch test={value}>
import React from "react";
export default function IFFISwitch() {
const [key, setKey] = React.useState("first");
return (
<div>
<div>
{(() => {
switch (key) {
case "first":
import React from "react";
const listData = [
"First Item",
"Second Item",
"Third Item",
{ "Fourth Item": ["First Nested Item", "Second Nested Item"] },
"Fifth Nested Item",
];
import React from "react";
const List = () => {
return (
<div>
<ul>
<li>First Item</li>
<li>Second Item</li>
<li>Third Item </li>
<li>
@UsmanHaider15
UsmanHaider15 / ansible-clone-repo-playbook.yml
Last active June 30, 2021 03:27
Ansible Clone private Repository
---
- hosts: all
vars:
GIT_REPO: <private-repo-url>
GIT_BRANCH: master
USER: ubuntu
PROJECT_NAME: ansible-clone-repo
gather_facts: no
tasks:
@UsmanHaider15
UsmanHaider15 / ansible.cfg
Last active June 30, 2021 03:27
Ansible clone private repository
[defaults]
host_key_checking = False
[ssh_connection]
ssh_args = -o ForwardAgent=yes

Keybase proof

I hereby claim:

  • I am usmanhaider15 on github.
  • I am uhaider (https://keybase.io/uhaider) on keybase.
  • I have a public key ASBH4GcrzbCRdJuH2m54dhPgpPVJguW0uKghbkXVGibC0go

To claim this, I am signing this object: