Skip to content

Instantly share code, notes, and snippets.

@muhshahabipour
muhshahabipour / a.jsx
Created December 21, 2019 20:22
sddfd
sdf
@muhshahabipour
muhshahabipour / index.js
Created December 21, 2019 19:59
react-notifications-component-index
import React from 'react';
import ReactNotifications from 'react-notifications-component';
import Homepage from './Homepage';
function App() {
return (
<div>
<ReactNotifications />
<Homepage/>
</div>
@muhshahabipour
muhshahabipour / MyNotification.jsx
Created December 21, 2019 19:59
react-notifications-component-my-notification
function MyNotification() {
return (
<div style={{
display: 'flex',
backgroundColor: '#0f2f26',
borderRadius: 5,
}}>
<Avatar/>
<div>
<h4>Virgool.io</h4>
@muhshahabipour
muhshahabipour / Homepage2.jsx
Last active December 21, 2019 20:12
react-notifications-component-homepage2
function Homepage() {
return (
<>
My Website
<button
onClick={() => {
store.addNotification({
content: MyNotification, // 👈
container: 'bottom-right',
animationIn: ["animated", "fadeIn"],
@muhshahabipour
muhshahabipour / Homepage.jsx
Created December 21, 2019 19:57
react-notifications-component-homepage
import React from 'react';
import { store } from 'react-notifications-component';
import 'react-notifications-component/dist/theme.css';
import 'animate.css';
function Homepage() {
return (
<>
My Website
<button
@muhshahabipour
muhshahabipour / loadOptions.js
Created November 3, 2019 12:17
async/await sample
const options = [];
for (let i = 0; i < 50; ++i) {
options.push({
value: i + 1,
label: `Option ${i + 1}`
});
}
const sleep = ms =>
new Promise(resolve => {
@muhshahabipour
muhshahabipour / login.js
Created December 7, 2018 15:30 — forked from milon87/login.js
x-www-form-urlencoded post in react native
getLoginAPI = () => {
let details = {
'username': 'username',
'password': 'demo'
};
let formBody = [];
for (let property in details) {
let encodedKey = encodeURIComponent(property);
@muhshahabipour
muhshahabipour / gist:8882a221ea12b80192b829e7c7a57e73
Created October 7, 2018 08:09 — forked from dsci/gist:1347672
Delete commits from repository.
# First, check out the commit you wish to go back to (get sha-1 from git log)
git reset --hard 9d3c3a0caa7f7b35ef15adb96fc80fcbb59ac72a
# Then do a forced update.
git push origin +9d3c3a0caa7f7b35ef15adb96fc80fcbb59ac72a^:develop
# Push specific commit
git push origin 9d3c3a0caa7f7b35ef15adb96fc80fcbb59ac72a:develop -f
@muhshahabipour
muhshahabipour / prettyjson.css
Created September 24, 2018 07:46 — forked from faffyman/prettyjson.css
Pretty print and syntax highlight JSON See it in action at http://jsfiddle.net/faffyman/KRb8W/
pre {
outline: 1px solid #ccc;
padding: 5px; margin:
5px;
}
.string {
color: #008000;
}

Gradient shadow in pure CSS

alt text

HTML
<button>Let's Go !</button>