Skip to content

Instantly share code, notes, and snippets.

View Bersam's full-sized avatar
🎯
Focusing

bersam Bersam

🎯
Focusing
View GitHub Profile
@Bersam
Bersam / getQuoteFancyImagesLinks.js
Created August 17, 2016 18:14
Quote Fancy Link Extractor.
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 / 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
#!/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 / .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