Skip to content

Instantly share code, notes, and snippets.

View BilalBudhani's full-sized avatar
👨‍💻
Building...

Bilal Budhani BilalBudhani

👨‍💻
Building...
View GitHub Profile
@BilalBudhani
BilalBudhani / FileUpload.js
Last active September 17, 2023 07:21
Upload Multiple Files To Cloudinary With React & Axios
handleDrop = files => {
// Push all the axios request promise into a single array
const uploaders = files.map(file => {
// Initial FormData
const formData = new FormData();
formData.append("file", file);
formData.append("tags", `codeinfuse, medium, gist`);
formData.append("upload_preset", "pvhilzh7"); // Replace the preset name with your own
formData.append("api_key", "1234567"); // Replace API key with your own Cloudinary key
formData.append("timestamp", (Date.now() / 1000) | 0);
@BilalBudhani
BilalBudhani / eslint.json
Created September 27, 2017 09:33
Wesbos' eslint + prettier config
{
"extends": [
"airbnb",
"prettier",
"prettier/react"
],
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 8,
"ecmaFeatures": {
@BilalBudhani
BilalBudhani / notes.txt
Created June 20, 2018 08:37
React Session Notes
const initialState = {
mute: true,
inProgress: true,
...///
}
const initialState = {
controls: {
mute: true,
@BilalBudhani
BilalBudhani / Caddyfile
Last active January 13, 2020 14:03
Caddy Systemd
test.hostmatic.site {
gzip
root /var/www/
log /var/www/access.log
errors /var/www/errors.log
}
@BilalBudhani
BilalBudhani / urlbox.rb
Created June 8, 2022 11:53
Urlbox.io Ruby Script
require 'openssl'
require 'uri'
require 'net/http'
def urlbox(url, options={}, format='png')
urlbox_apikey = ''
urlbox_secret = ''
query = {
:url => url, # required - the url you want to screenshot
@BilalBudhani
BilalBudhani / .bashrc
Last active February 7, 2025 05:02
Using AI to generate git commit message based on the files changed
alias aigc="git --no-pager diff HEAD --raw -p | llm -m 4o-mini -s 'You have been provided with the raw output of git diff command. Generate a single line meaningful yet concise commit message' | git commit -a --file -"