Skip to content

Instantly share code, notes, and snippets.

View siamak's full-sized avatar
🎯
Focusing

Siamak siamak

🎯
Focusing
View GitHub Profile
یک مورد از زیر را کپی کنید و در نرم‌افزار پیس کنید
vmess://eyJhZGQiOiJzbmFwcGZvb2QuaXIiLCJhaWQiOiIwIiwiaG9zdCI6ImFiZG9sbGFoaWFuLmlyIiwiaWQiOiJiODMxMzgxZC02MzI0LTRkNTMtYWQ0Zi04Y2RhNDhiMzA4MTEiLCJuZXQiOiJ3cyIsInBhdGgiOiIvZ3JhcGhxbCIsInBvcnQiOiI4MCIsInBzIjoiQXphZGktMiIsInNjeSI6ImNoYWNoYTIwLXBvbHkxMzA1Iiwic25pIjoiIiwidGxzIjoiIiwidHlwZSI6IiIsInYiOiIyIn0=
vmess://eyJhZGQiOiJpcGhvbmUuYXBhcmF0Y2xvdWQuY29tIiwiYWlkIjoiMCIsImhvc3QiOiIiLCJpZCI6ImI4MzEzODFkLTYzMjQtNGQ1My1hZDRmLThjZGE0OGIzMDgxMSIsIm5ldCI6IndzIiwicGF0aCI6Ii9ncmFwaHFsIiwicG9ydCI6IjgwIiwicHMiOiJBemFkaS00Iiwic2N5IjoiY2hhY2hhMjAtcG9seTEzMDUiLCJzbmkiOiIiLCJ0bHMiOiIiLCJ0eXBlIjoiIiwidiI6IjIifQ==
vmess://eyJhZGQiOiJjcnlwdG8uYXBhcmF0Y2xvdWQuY29tIiwiYWlkIjoiMCIsImhvc3QiOiIiLCJpZCI6ImI4MzEzODFkLTYzMjQtNGQ1My1hZDRmLThjZGE0OGIzMDgxMSIsIm5ldCI6IndzIiwicGF0aCI6Ii90cmFkZXMiLCJwb3J0IjoiODAiLCJwcyI6Ilphbi0yIiwic2N5IjoiY2hhY2hhMjAtcG9seTEzMDUiLCJzbmkiOiIiLCJ0bHMiOiIiLCJ0eXBlIjoiIiwidiI6IjIifQ==
vmess://eyJhZGQiOiJtcXR0LmFwYXJhdGNsb3VkLmNvbSIsImFpZCI6IjAiLCJob3N0IjoiIiwiaW
@siamak
siamak / servers.txt
Created September 23, 2022 10:44
Outline Free Server
Location: #‌‌United_Kingdom
Key type: #Free
Hosting: OVH
Quality and stability: 99%
Optimized for: Iran
ss://Y2hhY2hhMjAtaWV0Zi1wb2x5MTMwNTpVbHRyQHIwMHRfMjAxNw==@ak1427.free.www.outline.network:811#www.outline.network%20(united-kingdom)
@siamak
siamak / BEM__Mixin.scss
Last active May 17, 2021 14:10
Mixin of BEM selectors with SCSS
/*
_____ _ _ ___ ___ _ _ _ _
/ ___|(_) | | | \/ | | | | | | | (_)
\ `--. _ __ _ _ __ ___ __ _ | | __ | . . | ___ | | __| |__ | |_ __ _ _ __ _
`--. \| | / _` || '_ ` _ \ / _` || |/ / | |\/| | / _ \ | |/ /| '_ \ | __|/ _` || '__|| |
/\__/ /| || (_| || | | | | || (_| || < | | | || (_) || < | | | || |_| (_| || | | |
\____/ |_| \__,_||_| |_| |_| \__,_||_|\_\ \_| |_/ \___/ |_|\_\|_| |_| \__|\__,_||_| |_|
www.siamak.us
== Mixin of BEM selectors with SCSS: ==
@siamak
siamak / index.html
Last active February 16, 2021 15:53
mdrROEK
<i class="cursor"></i>
<div class="container">
<h1>My Cursor</h1>
<p>Move your mouse — See article</p>
<div class="gallery">
<a href="https://siamak.me" class="gallery--item">
<img class="gallery--img link" src="https://source.unsplash.com/q99oeAG46BY/400x288/" />
</a>
@siamak
siamak / App.jsx
Created October 3, 2020 12:25
Tic Tac Toe (React Hook Simple) Codesandbox: https://codesandbox.io/s/tic-tac-toe-z8wo7
import React from "react";
import { createGlobalStyle } from "styled-components";
import Board from "./components/Board/Board";
const GlobalStyle = createGlobalStyle`
body {
margin: 0;
padding: 0;
background: #f4f1de;
letter-spacing: -0.04em;
class MemoryCache {
memoryStore: Map<string, string>;
constructor() {
this.memoryStore = new Map();
}
async setItem(key: string, value: string): Promise<void> {
this.memoryStore.set(key, value);
}
async getAllKeys(): Promise<string[]> {
function expiration() {
// const due_date = new Date('2019-02-12'); // this date will be current date in most case
const due_date = new Date(); // this date will be current date in most case
const days_deadline = 7; // this is no. of days remaining for expiry date. In this case it will 2019-02-16
/* stop changing here */
const current_date = new Date();
const utc1 = Date.UTC(due_date.getFullYear(), due_date.getMonth(), due_date.getDate());
const utc2 = Date.UTC(current_date.getFullYear(), current_date.getMonth(), current_date.getDate());
const days = Math.floor((utc2 - utc1) / (1000 * 60 * 60 * 24));
@siamak
siamak / gradient.js
Last active April 5, 2019 11:09
Steps in Gradient
/**
* GradientArray • Steps gradient.
* @author Siamak Mokhtari <hi@siamak.work>
* @date 06/21/16.
*/
class GradientArray {
// Convert a hex color to an RGB array e.g. [r,g,b]
// Accepts the following formats: FFF, FFFFFF, #FFF, #FFFFFF
hexToRgb(hex) {
let r, g, b, parts;
@siamak
siamak / colors.scss
Created April 9, 2016 22:52
Sass (SCSS) Colors Maps. `map-get`
$colors: (
red: (
base : #FF4E4E,
dark : #FF0005
),
dark: (
base : #212121,
normal : #333333,
light : #E0E0E0
)