Skip to content

Instantly share code, notes, and snippets.

View TheSETJ's full-sized avatar

Sayyed Ehsan Taheri Javid TheSETJ

View GitHub Profile
@TheSETJ
TheSETJ / .zshrc
Last active August 5, 2019 15:34
My Z Shell configuration file
#! /bin/zsh -
# History
HISTSIZE=5000
HISTFILE=~/.zsh_history
SAVEHIST=5000
setopt appendhistory
setopt sharehistory
setopt incappendhistory
@TheSETJ
TheSETJ / keybase.md
Created March 12, 2019 05:45
A proof to Keybase that I am myself

Keybase proof

I hereby claim:

  • I am thesetj on github.
  • I am thesetj (https://keybase.io/thesetj) on keybase.
  • I have a public key ASB7w8eLiJ_ZR8tzHM-tt58WMXCBQto2wZalUvhywlYg3Ao

To claim this, I am signing this object:

@TheSETJ
TheSETJ / index.html
Created September 19, 2019 10:14
Fesenjan Recipe // source https://jsbin.com/hugosih
<!DOCTYPE html>
<html>
<head>
<!--
These stuff is genereted by JS Bin.
A little meta content to make things work right.
For sure, they do not affect the food. :)
-->
@TheSETJ
TheSETJ / CoinBags.php
Last active August 31, 2022 19:29
A function to calculate minimum steps required to make sure there are equal amount of coin in each bag
<?php
$c = [0,6,0];
$n = count($c);
$k = array_sum($c) / $n;
/*
* Consider having "n" bags in which there are ci coins (i=1 to n)
* as such that total count of coins are dividable by n and equal to "k".
*
@TheSETJ
TheSETJ / WorksWithUri.php
Created November 6, 2023 10:20
A trait that helps with formatting URI
<?php
trait WorksWithUri
{
private function makeFullUri($baseUri, $path)
{
return $this->formatBaseUri($baseUri) . $this->formatRelativePath($path);
}
private function formatBaseUri($baseUri)