Skip to content

Instantly share code, notes, and snippets.

View budhash's full-sized avatar

Budhaditya budhash

  • San Francisco Bay Area
View GitHub Profile
@mohd-akram
mohd-akram / json.awk
Last active July 5, 2025 05:25
Extract a value from a JSON object or array in awk
#
# Extract a JSON value in an object or array:
#
# name = decode_json_string(get_json_value(json, "author.name"))
# date = decode_json_string(get_json_value(json, "events.0.date"))
#
# Or an entire object:
#
# get_json_value(json, "dependencies", deps)
#
@ruvnet
ruvnet / q.py
Last active November 7, 2025 16:09
Q* (Q-Star)
# - Q* (Q-Star)
# /\__/\ - q.py
# ( o.o ) - v0.0.1
# >^< - by @rUv
# 01110010 01110101 01110110
# This is a proof of concept implementation of the Q* (AGI) leak from OpenAi
# This Python code defines a sophisticated Q-learning agent for reinforcement learning.
# It includes dynamic exploration, learning from experiences, and checks for convergence.
# The agent's capabilities are refined iteratively to optimize its decision-making strategy in a given environment.
@huytd
huytd / wordle.md
Last active October 29, 2025 21:41
Wordle in less than 50 lines of Bash

image

How to use:

./wordle.sh

Or try the unlimit mode:

//
// ContentView.swift
// MadeForYouCard
//
// Created by AppleDesignDev on 1/24/22.
//
import SwiftUI
struct ContentView: View {
@ageis
ageis / YubiKey-GPG-SSH-guide.md
Last active June 25, 2025 15:14
Technical guide for using YubiKey series 4 for GPG and SSH

YubiKey 4 series GPG and SSH setup guide

Written for fairly adept technical users, preferably of Debian GNU/Linux, not for absolute beginners.

You'll probably be working with a single smartcard, so you'll want only one primary key (1. Sign & Certify) and two associated subkeys (2. Encrypt, 3. Authenticate). I've published a Bash function which automates this slightly special key generation process.

@andkirby
andkirby / slack.sh
Last active September 18, 2025 15:26
Shell/Bash script for sending slack messages.
#!/usr/bin/env bash
####################################################################################
# Slack Bash console script for sending messages.
####################################################################################
# Installation
# $ curl -s https://gist.githubusercontent.com/andkirby/67a774513215d7ba06384186dd441d9e/raw --output /usr/bin/slack
# $ chmod +x /usr/bin/slack
####################################################################################
# USAGE
# Send message to slack channel/user
@darylteo
darylteo / ArrayOrObject.java
Last active November 8, 2022 10:48
Jackson Deserializer based on several StackOverflow posts.
import java.util.List;
@Data
public class ArrayOrObject<T> {
private List<T> data;
private Boolean isObject;
}
@msbanik
msbanik / elasticsearch-with-typeahead-js-editted.markdown
Created August 20, 2016 17:21
ElasticSearch with Typeahead.js - editted
package com.budhash.common.utils;
//import com.github.drapostolos.typeparser.TypeParser;
import org.apache.commons.lang3.StringUtils;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
public class Converter {
@steinwaywhw
steinwaywhw / One Liner to Download the Latest Release from Github Repo.md
Last active November 4, 2025 19:23
One Liner to Download the Latest Release from Github Repo
  • Use curl to get the JSON response for the latest release
  • Use grep to find the line containing file URL
  • Use cut and tr to extract the URL
  • Use wget to download it
curl -s https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \