Skip to content

Instantly share code, notes, and snippets.

View Bersam's full-sized avatar
🎯
Focusing

bersam Bersam

🎯
Focusing
View GitHub Profile
@Bersam
Bersam / .zshrc
Last active October 12, 2019 15:17
Ultimate Linux Setup
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/home/bersam/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
#!/bin/bash
while read line
do
SERVERIP=$line
[email protected]
ping -c 3 $SERVERIP > /dev/null 2>&1
if [ $? -ne 0 ]
then
# Use your favorite mailer here:
@Bersam
Bersam / fetchLowestFlightPrice.py
Last active September 9, 2023 09:54
fetch lowest flight price in next two weeks from sepehr360
#!/usr/bin/python
import requests
from datetime import datetime, timedelta
# Config:
source = "THR,IKA"
destination = "BND"
sthreshold = 130 # hezar toman, color (soft) threshold
hthreshold = 170 # toggle (hard) threshold
print_friendly = True
var PQ = require("bull/lib/priority-queue");
var testQ = PQ("test:seek", 7777, '127.0.0.1');
var priorities = [
"low",
"normal",
"medium",
"high",
"critical"
@Bersam
Bersam / getQuoteFancyImagesLinks.js
Created August 17, 2016 18:14
Quote Fancy Link Extractor.
var clean = function(self){
return self.pause()
.then(function() {
log.info(self.data.username + " is paused.");
self.toFollow.on('cleaned', function(job, type) {
console.log('Cleaned %s %s jobs', job.length, type);
});
return self.toFollow.clean(0, 'completed');
})
.then(function() {

Keybase proof

I hereby claim:

  • I am bersam on github.
  • I am bersam (https://keybase.io/bersam) on keybase.
  • I have a public key whose fingerprint is 2B67 3DAD 18E6 3BEC 2D85 93C1 C297 5D58 FD1A 97F3

To claim this, I am signing this object:

http://rami.ir/fa/wp-content/uploads/2010/11/Avarah.mp3
http://rami.ir/fa/wp-content/uploads/2010/11/Asir-1.mp3
http://rami.ir/fa/wp-content/uploads/2011/12/Onroozo.mp3
http://rami.ir/fa/wp-content/uploads/2010/11/Baron-baraku.mp3
http://rami.ir/fa/wp-content/uploads/2010/11/Bad-omkeh-1.mp3
http://rami.ir/fa/wp-content/uploads/2010/11/Berkeye-khoshk.mp3
http://rami.ir/fa/wp-content/uploads/2010/11/Bolbol-1.mp3
http://rami.ir/fa/wp-content/uploads/2010/11/Bodow-bodow-1.mp3
http://rami.ir/fa/wp-content/uploads/2010/11/Bikasi-1.mp3
http://rami.ir/fa/wp-content/uploads/2010/11/Tanhayi.mp3
@Bersam
Bersam / biditex-Sample.tex
Last active December 26, 2015 16:12
Sample Tex File With Full Bidi Support (Including Numbers)
\documentclass{article}
\usepackage{xepersian}
\makeatletter
% classes 1-3 are used in unicode-letters.tex, so we'll put the Latin letters in 4
\newcount\xp@n
\xp@n=`\A \loop \XeTeXcharclass \xp@n=4 \ifnum\xp@n<`\Z \advance\xp@n by 1 \repeat
\xp@n=`\a \loop \XeTeXcharclass \xp@n=4 \ifnum\xp@n<`\z \advance\xp@n by 1 \repeat
% this line would put Latin numbers in 4 class too.
\xp@n=`\0 \loop \XeTeXcharclass \xp@n=4 \ifnum\xp@n<`\9 \advance\xp@n by 1 \repeat
% when we encounter class 4, we'll do \startlatin
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration."
(setq-default
;; List of additional paths where to look for configuration layers.
;; Paths must have a trailing slash (ie. `~/.mycontribs/')
dotspacemacs-configuration-layer-path '()