Skip to content

Instantly share code, notes, and snippets.

View nunetc's full-sized avatar
🏠
Working from home

Gtnun Etc nunetc

🏠
Working from home
View GitHub Profile
@diachedelic
diachedelic / deep-link-from-browser.js
Last active December 9, 2025 18:35
Deep link to a native app from a browser, with a fallback
@filipefigcorreia
filipefigcorreia / kafka-cheat-sheet.md
Last active October 28, 2025 20:11
Apache Kafka Cheat Sheet

Kafka Topics

List existing topics

bin/kafka-topics.sh --zookeeper localhost:2181 --list

Purge a topic

bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic mytopic --config retention.ms=1000

... wait a minute ...

bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic mytopic --delete-config retention.ms

@shimarin
shimarin / AntiXSRFFilter.java
Last active August 29, 2015 13:55
A servlet filter which provides functionality supports AngularJS's XSRF protection scheme.
package com.walbrix.servlet;
import java.io.IOException;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.Cookie;
@varunachar
varunachar / CacheBuster.java
Last active September 29, 2016 10:04
A cache buster for jsp. Meant for webapp sitting behind a Apache 2 server. Cache is busted by appending a file with it's last modified time and then including it in a JSP. Example : <script type="text/javascript" src="js/trelta-all.min.123345.js" ></script> You don't need to modify the actual name of the file on the hard disk, since we've define…
package com.trelta.commons.web;
import java.io.File;
import org.apache.commons.io.FilenameUtils;
import com.trelta.commons.utils.constants.Settings;
/**
* Cache Buster which appends the last modified time of a file to it's name
@jed
jed / LICENSE.txt
Created May 20, 2011 13:27 — forked from 140bytes/LICENSE.txt
generate random UUIDs
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <http://jed.is>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE