Skip to content

Instantly share code, notes, and snippets.

View abdus's full-sized avatar

Abdus abdus

View GitHub Profile
#!/usr/bin/env bash
REPO=artistic
UPLOAD_INSTRUCTIONS="Upload your creation to GitHub!
# 1. Create a new empty repo on your GitHub account
# 2. Upload your repository using the instructions on https://github.com/new, or this script!"
git init $REPO
cd $REPO
touch README.md
#!/bin/sh
# Stage and Commit Every Unsaved changes
# and push them to master
git add .
git commit -m 'comitted from deploy script'
git push origin master
# generate a clean build
bundle exec jekyll clean
@abdus
abdus / secure-email-static-site.html
Created November 7, 2019 08:33
Sending Encrypted Emails from Front-End/Static Sites
<html>
<body>
<form action="">
<input
type="email"
id="email"
name="email"
placeholder="mail@abdus.xyz"
/>
<br />
@abdus
abdus / mode.js
Created August 3, 2019 14:14
get the most frequent element from an array. In other words, mode of an array
/**
* Getting the most frequent element from an array
*/
function mode(array = []) {
// check if it is an array and have atleast a single element
if (!Array.isArray(array)) {
throw new Error(`Please provide an array as argument`);
}
const fetch = require('node-fetch')
const { execSync } = require('child_process')
async function getRepoURLs(user) {
let gh_data = await fetch(`https://api.github.com/users/${user}/repos`)
gh_data = await gh_data.json()
return gh_data
}
async function main() {
@abdus
abdus / share.html
Created March 18, 2019 13:07
Jekyll Site Social Share Buttons
<div id="share">
<a
href="https://www.facebook.com/sharer/sharer.php?u={{
page.url | absolute_url
}}"
target="_blank"
><i style="color: #44609c" class="fab fa-facebook-f"></i
></a>
<a
href="http://www.reddit.com/submit?url={{
@abdus
abdus / mp4toGIF.sh
Last active December 9, 2018 14:06
this script accept a mp4 file path as an arg and convert it to GIF and stores in the same dir
#!/bin/bash
if [ ! -d ./frames ]
then
mkdir frames
fi
ffmpeg -i $1 -r 20 'frames/frame-%03d.jpg'
cd frames
convert -delay 5 -loop 0 *.jpg $1.gif
@abdus
abdus / linkedin-auto-invite.js
Last active September 3, 2019 03:22
Simple script for sending mass invite on linkedin #automation #auto-invite
// ++++++++++++++++++++++++++++++++++++++++++++++++++++
// script for sending auto invite to people in linkedin
// ++++++++++++++++++++++++++++++++++++++++++++++++++++
//
// Simple script for sending mass invite on linkedin
// NOTE: This will send invite to the profiles available in your 'RECOMANDATION' tab
//
//
//
// HOW TO
{
"short_name": "Abdus",
"name": "Abdus",
"icon": [
{
"src": "/pwa/img/icons-192.png",
"type": "image/png",
"sizes": "192x192"
},
{