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
==> nectarine_credit_api
Compiling 127 files (.ex)
warning: variable "assigns" is unused (if the variable is not meant to be used, prefix it with an underscore)
lib/nectarine_credit_api_web/plugs/sentry_context.ex:8: NectarineCreditWeb.Plugs.SentryContext.call/2
warning: variable "last_updated" is unused (if the variable is not meant to be used, prefix it with an underscore)
lib/nectarine_credit_api/external/finicity/auth_token_service.ex:15: NectarineCredit.External.Finicity.AuthTokenService.init/1
warning: variable "token" is unused (if the variable is not meant to be used, prefix it with an underscore)
lib/nectarine_credit_api/external/finicity/auth_token_service.ex:15: NectarineCredit.External.Finicity.AuthTokenService.init/1
@ijunaid8989
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.
@doc"""
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
files
|> Enum.map(fn {filename, content} -> {to_string(filename), content} end)
|> Map.new
end
end
{
"data" => %{
"data" => [],
"electricity" => [
%{
"category" => "electricity",
"display_name" => "Umeme Display name!",
"id" => "86033d3c-dd19-4547-9df5-a022952e4d75",
"is_enabled" => true,
"logo_url" => "http://example.com/logo.png",
Junaid Farooq 1:39 PM
Hi Chris
leveldb/table: corruption on data-block (pos=0): checksum mismatch, want=0x20258dff got=0x426a0169 [file=14883696.ldb]
Junaid Farooq 8:36 AM
When I try to move this file 14883696.ldb
from _main folder, filer dont work
8:37
%{
"artificery": {:hex, :artificery, "0.4.3", "0bc4260f988dcb9dda4b23f9fc3c6c8b99a6220a331534fdf5bf2fd0d4333b02", [:mix], [], "hexpm", "12e95333a30e20884e937abdbefa3e7f5e05609c2ba8cf37b33f000b9ffc0504"},
"bbmustache": {:hex, :bbmustache, "1.11.0", "a6dbfc5cee3e1d7d17aad5f5b8880b4508d974611da8d73e1f6c28bde65d4c47", [:rebar3], [], "hexpm", "7c9cdcf58dc043377ab792a8c7109d8902695fcae3b35c1078a8b38ddcf86e5f"},
"bcrypt_elixir": {:hex, :bcrypt_elixir, "2.2.0", "3df902b81ce7fa8867a2ae30d20a1da6877a2c056bfb116fd0bc8a5f0190cea4", [:make, :mix], [{:comeonin, "~> 5.3", [hex: :comeonin, repo: "hexpm", optional: false]}, {:elixir_make, "~> 0.6", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm", "762be3fcb779f08207531bc6612cca480a338e4b4357abb49f5ce00240a77d1e"},
"bunt": {:hex, :bunt, "0.2.0", "951c6e801e8b1d2cbe58ebbd3e616a869061ddadcc4863d0a2182541acae9a38", [:mix], [], "hexpm", "7af5c7e09fe1d40f76c8e4f9dd2be7cebd83909f31fee7cd0e9eadc567da8353"},
"cachex": {:hex, :cachex, "3.3.0", "6f2ebb8f27491fe3
defmodule EvercamMedia.Mixfile do
use Mix.Project
def project do
[
app: :evercam_media,
version: "1.0.#{DateTime.to_unix(DateTime.utc_now())}",
elixir: "~> 1.11.1",
elixirc_paths: elixirc_paths(Mix.env()),
build_embedded: Mix.env() == :prod,
@ijunaid8989
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
ijunaid8989 / lsi.sh
Created June 17, 2020 04:58 — forked from demofly/lsi.sh
MegaCli wrapper for LSI MegaRAID for Debian/Ubuntu/RHEL/CentOS
#!/bin/bash
#
# originally came from Calomel.org
# https://calomel.org/megacli_lsi_commands.html
# LSI MegaRaid CLI
# lsi.sh @ 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.
class Maze
# Generate a maze.
def generate(width, height)
@width = width
@height = height
@maze = Array.new
for y in 0 ... @height
for x in 0 ... @width
@maze[y * @width + x] = 1
[
{
"id": 1528965627,
"Anger": 0,
"Disgust": 0,
"FaceDetected": 0,
"Fear": 0,
"Happiness": 0,
"LargeFaceDetected": 0,
"MotionDetected": 0,