Skip to content

Instantly share code, notes, and snippets.

View ni554n's full-sized avatar
🪚
Building Stuff

Nissan Ahmed ni554n

🪚
Building Stuff
View GitHub Profile
@ni554n
ni554n / fb-pages-status.js
Last active September 26, 2019 02:53
Get status report for Facebook user's own liked pages based on page's latest post time.
/**
* Script for generating Facebook user's own liked pages status report as JSON. The report consists of active, inactive,
* unavailable page Ids validated based on page's latest post time.
*
* Unfortunately Facebook doesn't support "unlike" a page via API. So, these IDs should be used with a userscript.
*/
const got = require("got");
const cheerio = require("cheerio");
const fs = require("fs");
@ni554n
ni554n / gif_to_webm.bat
Last active February 3, 2024 21:15
Convert a folder of GIFs to WEBM with FFMPEG.
@ECHO off
ECHO :: GIF to WEBM Converter ::
ECHO ---------------------------
:: Replace this ffmpeg variable value with your own ffmpeg.exe path.
SET ffmpeg=%USERPROFILE%\Programs\JDownloader\tools\Windows\ffmpeg\x64\ffmpeg.exe
SET command=%ffmpeg% -i "%%f" -c:v libvpx-vp9 -b:v 0 -crf 30 -an -f webm -passlogfile "%TEMP%\ffmpeg2pass.log"
SET /P folder="Input directory path: "
@ni554n
ni554n / wifi_hotspot_utility.bat
Created December 25, 2017 08:17
Easily share Windows local network connection via Wifi Hotspot Utility.
@ECHO OFF
COLOR 00
ECHO :: WiFi Hotspot Utility ::
ECHO --------------------------
:: Set your desired Network name to "ssid" and Password to "key" variable.
netsh wlan set hostednetwork mode=allow ssid=HomePC key=Hello_World >nul
netsh wlan start hostednetwork
ECHO ! Did you enable Internet Connection Sharing of your connected modem?
@ni554n
ni554n / vpnbook_password.py
Last active December 25, 2017 08:20
A Python 3 script to copy latest VPNBook password to clipboard.
#!/usr/bin/env python3
"""
A Python 3 script to copy latest VPNBook password to clipboard.
Copy to clipboard is supported on Windows / macOS.
Author: Nissan Ahmed
"""
import os
@ni554n
ni554n / reboot_router.py
Last active April 3, 2020 13:30
A Python 3 script to reboot TP-LINK TD-W8950N / TD-W8950ND routers.
#!/usr/bin/env python3
"""
A python 3 script to reboot TP-LINK routers.
Tested on: TD-W8950N / TD-W8950ND.
Author: Nissan Ahmed
"""
import base64