Skip to content

Instantly share code, notes, and snippets.

View ijunaid8989's full-sized avatar
It may have escaped your notice but life isn't fair.

Junaid Farooq ijunaid8989

It may have escaped your notice but life isn't fair.
  • Islamabad Pakistan
View GitHub Profile
ijunaid8989 /
Created February 1, 2024 20:40 — forked from jeregrine/
Setting up Redo and Poolboy for redis connections in Elixir

Then add

worker(Redis, []),

to your supervision tree

ijunaid8989 / extract_tar_from_binary.ex
Created September 12, 2022 12:41 — forked from nroi/extract_tar_from_binary.ex
Decompressing a tar.gz archive in Elixir with Erlang's :erl_tar module.
Returns a map containing all files and their contents from the compressed tar archive.
def extract_tar_from_binary(binary) do
with {:ok, files} <- :erl_tar.extract({:binary, binary}, [:memory, :compressed]) do
|> {filename, content} -> {to_string(filename), content} end)
ijunaid8989 / pooled_crawler.ex
Created July 3, 2020 13:22 — forked from Manzanit0/pooled_crawler.ex
Web crawler which uses Floki and HTTPoison – does 5 request at a time
# Dependencies:
# {:httpoison, "~> 1.5"},
# {:floki, "~> 0.21.0"}
# {:benchee, "~> 1.0"} (Only for benchmarking – not in the script)
defmodule CrawlQueue do
use Agent
def start_link(urls) do
ijunaid8989 /
Created June 17, 2020 04:58 — forked from demofly/
MegaCli wrapper for LSI MegaRAID for Debian/Ubuntu/RHEL/CentOS
# originally came from
# LSI MegaRaid CLI
# @ Version 0.05
# Edited and optimized by demofly for rotational RAID arrays
# description: MegaCLI script to configure an Sound alarm disabled (server room too loud anyways)d monitor LSI raid cards.
ijunaid8989 /
Created January 27, 2018 13:43 — forked from mbenatti/
Installing Bootstrap + Font Awesome from NPM in Phoenix Framework using sass
  • Tested with Phoenix 1.3

1) Installing sass, font-awesome and bootstrap package's

First, install the Sass, Font Awesome, bootstrap(and deps) package:

cd assets

  • npm install --save-dev sass-brunch
  • npm install --save font-awesome
ijunaid8989 / capybara cheat sheet
Last active September 17, 2015 06:54 — forked from zhengjia/capybara cheat sheet
capybara cheat sheet
=Clicking links and buttons=
click_link('Link Text')
click('Link Text') # Click either a link or a button
click('Button Value')