Skip to content

Instantly share code, notes, and snippets.

View iraniamir's full-sized avatar
💪
Let's Dance

Amir Irani iraniamir

💪
Let's Dance
  • Internet
View GitHub Profile
{
"hasError": false,
"referenceNumber": "207899",
"errorCode": 0,
"count": 0,
"ott": "ad341b80f845cd2e",
"result": {
"id": 132,
"hash": "M9XRVIRGBQEQW5BW",
"ownerId": 0,
@iraniamir
iraniamir / index.html
Created August 21, 2018 13:00
Chunk upload file
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Fanap Drive Upload</title>
</head>
<body>
@iraniamir
iraniamir / server.js
Created September 16, 2018 12:57
CacheRestServer
const express = require('express');
const axios = require('axios');
const cacheAdapter = require('axios-cache-adapter');
const app = express()
const port = 3210
const fetchCache = cacheAdapter.setup({
cache: {
maxAge: 15 * 60 * 1000
}
@iraniamir
iraniamir / form-validation.jsx
Created October 28, 2018 16:08
React html5 form validation
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { EMLINK } from 'constants';
export default class FormValidation extends Component {
static propTypes = {
children: PropTypes.node,
submit: PropTypes.func.isRequired
};
@iraniamir
iraniamir / main.go
Last active May 1, 2019 03:25
Instagram, show summary email address
package main
import (
"fmt"
"strings"
)
func main() {
fmt.Print(hideEmailAddress("emailAddress@gmail.com"))
@iraniamir
iraniamir / main.go
Created May 8, 2019 07:42
IPv4 to Mongo ObjectID
package main
import (
"encoding/hex"
"fmt"
"strings"
"gopkg.in/mgo.v2/bson"
)
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="https://media.rss.com/style.xsl"?>
<rss xmlns:podcast="https://podcastindex.org/namespace/1.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" xml:lang="en" version="2.0">
<channel>
<title><![CDATA[سیاره زمین]]></title>
<link>https://feed.ufopersian.ir/planet-earth</link>
<atom:link href="https://feed.ufopersian.ir/planet-earth/rss.xml" rel="self" type="application/rss+xml"/>
<atom:link rel="hub" href="https://pubsubhubbub.appspot.com/"/>
<description><![CDATA[<p>گفتمانی دوستانه پیرامون این سیاره و کهکشان خودمون</p>]]></description>
<generator>RSS.com v2.10.1</generator>