Skip to content

Instantly share code, notes, and snippets.

View dextel2's full-sized avatar
♟️
Checkmate

Yash Karanke dextel2

♟️
Checkmate
View GitHub Profile
@rxaviers
rxaviers / gist:7360908
Last active April 23, 2024 19:14
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@palashmon
palashmon / Prettify.ts
Created May 13, 2023 16:11
A super useful type helper in TypeScript by Matt Pocock from Twitter
/**
* A TypeScript type alias called `Prettify`.
* It takes a type as its argument and returns a new type that has the same properties as the original type,
* but the properties are not intersected. This means that the new type is easier to read and understand.
*/
type Prettify<T> = {
[K in keyof T]: T[K];
} & {};
@alexsasharegan
alexsasharegan / .htaccess
Created September 7, 2016 00:36
Apache Config for React Router
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule . /index.html [L]
@niveshsaharan
niveshsaharan / JsColor.js
Last active March 13, 2022 04:01
React.js Component for jscolor.com
import React, { Component } from 'react';
import '../plugins/jscolor/jscolor';
/**
* JsColor
*/
class JsColor extends Component {
/**
* JsColor Constructor
* @param {*} props
@psdtohtml5
psdtohtml5 / gist:6090113
Last active September 5, 2021 16:09
PHP : Auto expire session / Auto logout after specific time
<?php
//on pageload
session_start();
$idletime=60;//after 60 seconds the user gets logged out
if (time()-$_SESSION['timestamp']>$idletime){
session_destroy();
session_unset();
}else{
@dextel2
dextel2 / random-email.js
Created November 22, 2019 08:53
Random Email Generator
var chars = 'abcdefghijklmnopqrstuvwxyz1234567890_';
var string = '';
var domainName = ["hitmail.com","rxdoc.biz","cox.com","126.net","126.com","comast.com","comast.net", "yandex.com","wegas.ru","twc.com","charter.com",];
for (var index = 0; index < 15; index++) {
string += chars[Math.floor(Math.random() * chars.length)];
}
var finalEmail = string + "@" + domainName[Math.floor(Math.random() * domainName.length)];
console.log(finalEmail);