Skip to content

Instantly share code, notes, and snippets.

@vivekkumarava1
vivekkumarava1 / Raju.java
Created August 26, 2020 19:19
Print the names of students by creating a Student class. If no name is passed while creating an object of Student class, then the name should be “Unknown”, otherwise the name should be equal to the String value passed while creating an object of Student class
class student{
String ss;
String name;
public student(String ss){
name = ss;
}
public student()
{
name = "unknown";
}
@ZakGriffith
ZakGriffith / Contribution.md
Last active February 10, 2025 19:00
BuidlGuidl contribution guidelines and CLI tutorial

All Pull Requests need to reference an existing Issue. If one does not exist, first create the Issue to address your fix or additions


⛔ If you do not have access to the repo, start by forking the repo. The following can be completed on your fork.

🔑 If you do have access, the following can be done on the repo you are trying to edit.


@FreddieOliveira
FreddieOliveira / docker.md
Last active February 10, 2025 18:56
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android 🐋📱

Edit 🎉

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary

Scaling your API with rate limiters

The following are examples of the four types rate limiters discussed in the accompanying blog post. In the examples below I've used pseudocode-like Ruby, so if you're unfamiliar with Ruby you should be able to easily translate this approach to other languages. Complete examples in Ruby are also provided later in this gist.

In most cases you'll want all these examples to be classes, but I've used simple functions here to keep the code samples brief.

Request rate limiter

This uses a basic token bucket algorithm and relies on the fact that Redis scripts execute atomically. No other operations can run between fetching the count and writing the new count.

@brauliobo
brauliobo / test-vpnspace.service
Created September 4, 2024 00:30
OpenVPN network namespace service and sample unit returning its public IP address
[Unit]
Description=Test NetworkNamespacePath with DynamicUser
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
# Use DynamicUser to create a temporary user for the service
DynamicUser=true

Auto-fill OneView Timesheets

Forked from Michael Bruno

Install

  1. Download a plugin called Tamper Monkey.
  2. Navigate to http://oneview.kroger.com/
  3. Click the Tampermonkey extension icon in your browser, and select "create new script"
  4. Paste the script into the function body.
@ruvnet
ruvnet / cohen.md
Last active February 10, 2025 18:46
Cohen’s Conjecture

Cohen’s Agentic Conjecture: A Dual-Process Neuro-Symbolic Framework for Agentic AI

Abstract

This research introduces Cohen’s Agentic Conjecture (CAC), proposing that an artificial intelligence system integrating fast, neural heuristics (System 1) with slow, symbolic logic (System 2) through a dynamic gating mechanism can exhibit emergent agentic properties. These properties include context-aware decision-making, self-directed learning, robust reasoning, and reflective self-correction. Drawing inspiration from dual-process cognitive theories and neuro-symbolic AI paradigms, this work formalizes CAC, presents a comprehensive Python implementation, and validates the conjecture through empirical experiments. The findings demonstrate that CAC-enhanced systems outperform purely neural or purely symbolic counterparts in terms of accuracy, interpretability, and adaptability. This framework lays the groundwork for developing next-generation AI agents capable of autonomous, reliable, and

@sneakers-the-rat
sneakers-the-rat / clean_pdf.sh
Last active February 10, 2025 18:41
Strip PDF Metadata
# --------------------------------------------------------------------
# Recursively find pdfs from the directory given as the first argument,
# otherwise search the current directory.
# Use exiftool and qpdf (both must be installed and locatable on $PATH)
# to strip all top-level metadata from PDFs.
#
# Note - This only removes file-level metadata, not any metadata
# in embedded images, etc.
#
# Code is provided as-is, I take no responsibility for its use,
@amsam0
amsam0 / AmongUsModdingResources.md
Last active February 10, 2025 18:31
A list of resources for among us modding. Aimed at helping beginners

Among Us Modding Resources

A list of resources for among us modding.

Getting started: go to https://docs.reactor.gg/docs

or: go to the website reactor.gg, join the discord and see the pinned message in #modding

  • General