Skip to content

Instantly share code, notes, and snippets.

View dexterous's full-sized avatar

Saager Mhatre dexterous

View GitHub Profile
@dexterous
dexterous / ArtIsNotAboutYou.md
Created April 16, 2021 14:20 — forked from Madrox/ArtIsNotAboutYou.md
Art is Not About You

Art is Not About You

Forked from a community statement about Clojure

The only people entitled to say how art 'ought' to work are people who make art, and the scope of their entitlement extends only to their own art.

Just because someone creates something does not imply they owe the world a change in their status, focus and effort, e.g. from artist to community manager.

As an appreciator of a piece of art you are not thereby entitled to anything at all. You are not entitled to a say in how it evolves. You are not entitled to timely updates. You are not entitled to the attention of the artist. You are not entitled to having value attached to your complaints. You are not entitled to this explanation.

(->> (System/getProperties)
(filter #(clojure.string/ends-with? (key %) ".path"))
(map #(clojure.string/join "\n\t" (cons (key %) (clojure.string/split (val %) (re-pattern java.io.File/pathSeparator)))))
(clojure.string/join "\n\n")
(println))
#!/bin/bash -e
if [[ -n "$DEBUG" ]]; then
set -x
PS4='+ [ $(date +%T) ] '
fi
if [[ -f ./main.exe && ./main.exe -ot ./main.cs ]]; then
echo -n "Compiled binary outdated; removing... "
@dexterous
dexterous / vimium-options.json
Last active March 20, 2025 23:32
Tool Settings
{
"searchEngines": "img: https://www.google.com/search?q=%s&tbm=isch Google Image\nwiki: http://www.wikipedia.org/w/index.php?title=Special:Search&search=%s Wikipedia\nyt: http://www.youtube.com/results?search_query=%s Youtube\npocket: https://getpocket.com/saves/search?query=%s Pocket\naz: http://www.amazon.com/s/?field-keywords=%s Amazon\n\n# More examples.\n#\n# (Vimium supports search completion Wikipedia, as\n# above, and for these.)\n#\n# g: http://www.google.com/search?q=%s Google\n# l: http://www.google.com/search?q=%s&btnI I'm feeling lucky...\n# gm: https://www.google.com/maps?q=%s Google maps\n# b: https://www.bing.com/search?q=%s Bing\n# d: https://duckduckgo.com/?q=%s DuckDuckGo\n# qw: https://www.qwant.com/?q=%s Qwant",
"settingsVersion": "2.2.0",
"userDefinedLinkHintCss": "div > .vimiumHintMarker {\n /* linkhint boxes */\n background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#FFF785), color-stop(100%,#FFC542));\n border: 1px solid #E3BE23;\n}\n\ndiv > .vimiumHintMa
@dexterous
dexterous / move_from_dead_letter.py
Last active January 13, 2024 09:14
Some people just don't get how to do concurrency/parallelism right. (sigh!)
import boto3
import sys
import Queue
import threading
work_queue = Queue.Queue()
sqs = boto3.resource('sqs')
from_q_name = sys.argv[1]
@dexterous
dexterous / TestHarnessHTTPServer.groovy
Last active October 21, 2020 23:14
Quick and dirty HTTP server for functional tests that presents itself as a Future.
import java.util.concurrent.CompletableFuture
import java.util.concurrent.TimeUnit
import java.util.concurrent.CancellationException
import java.util.concurrent.TimeoutException
import java.net.InetSocketAddress
import com.sun.net.httpserver.HttpServer
import com.sun.net.httpserver.HttpHandler
import com.sun.net.httpserver.HttpExchange
(defn sum [coll]
(apply + coll))
(defn squares [coll]
(map #(* % %) coll))
(def first-n take)
(defn integers []
(iterate inc 1))
@dexterous
dexterous / fizzbuzz
Created October 7, 2017 04:05
A succinct bash fizzbuzz
#!/bin/bash -e
#set -o xtrace
if [[ $# -lt 1 ]]; then
echo '
Usage: fizzbuzz upto
upto: The number upto which to count
'
@dexterous
dexterous / an-american-bakt.md
Last active March 15, 2017 05:12
An American Bakt[sic]?? -Jason K

As posted on Facebook; and subsequently deleted

As an American and a self confessed Indophile, I had a lot of insights I gleaned while traversing the length and breadth of the country. Incidentally I take care of funded projects and this exposes me to a interactions with the poor and ultra poor of the country. Hopefully I will debunk a few myths about India, which my North American colleagues should know, along with some Indians who will hopefully read this post:

  1. Like it or leave it, the hinterland of India is firmly behind Modi. They don't give a rat's ass if you call them his followers, or "bakts" as I have heard. For the first time they have a leader and a party that has gone through almost 3 years without a single financial scam against their name. For a country used to spectacular monetary frauds and a silent PM who took plausible deniability to laughable proportions, this is a great and welcome change
  2. Muslim don't hate Modi. Educated intelligent non Muslims (read Hindus) hate him more! Simply
<html>
<body>
<form method="GET" action="/file" target="_blank">
<input name="filename" type="text" />
<input name="submit" type="submit" />
</form>
</body>
</html>