Skip to content

Instantly share code, notes, and snippets.


Darius Kazemi dariusk

View GitHub Profile
echo "<!DOCTYPE html> <html lang=\"en\"> <head> <meta charset=\"utf-8\"> <title>${PWD##*/}</title> <meta charset=\"UTF-8\"> <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"> <link rel='stylesheet' href='../css/style.css' type='text/css' media='all' /> </head> <body><p><a href=\"..\">&larr; Tiny Subversions</a></p>" > index.html
marked --gfm -i >> index.html
echo "<script src=\"../js/highlight.pack.js\"></script><script>hljs.initHighlightingOnLoad();</script></body></html>" >> index.html
dariusk /
Last active Jan 12, 2020
Friend Camp Info

Some quick things about Friend Camp

from your admin, Darius

  • Friend Camp is compatible with any mobile Mastodon app BUT you will not have friend camp specific features like the ability to post local-only posts just to Friend Camp. For this reason I recommend using the web client ( in your mobile browser) whenever possible.

    • On Android this is fine because Android lets a website send native notifications. Just go to Friend Camp in your browser and choose "add to home screen" from the browser menu. It will behave just like an app and you'll get notifications like normal.
    • On iOS you can pin the website to your home page and it will work great EXCEPT there are no native notifications, so for that reason a lot of users on iOS use other clients like Amaroq or Mast. But I also recommend trying out friend camp without notifications at all! It's nice.
  • Please file bugs with me. Just DM them to me or @ them to me. I will add them to the Friend Camp todo list.

  • We have lots of friend


Keybase proof

I hereby claim:

  • I am dariusk on github.
  • I am dariusk ( on keybase.
  • I have a public key ASAz0a1xSp-pGUyG4_n8dDEROns5q1WsFA2GQbLxNnW7ego

To claim this, I am signing this object:


Some suggestions for Twitter to help devs struggling with the Streaming API deprecation

I'm writing this up in a hurry tonight, apologies if it's a little rambly/ranty. There are a lot of devs out there who have really great apps that rely on the Streaming API and really want to port their apps to webhooks but have no idea how to do it because the technical communication around all this has been scattershot.

-Darius Kazemi, @tinysubversions, 14 May 2018

Make your Securing Webhooks document more helpful

If there is one thing that your team has been clear on, it is this: we need to replace our usage of the Streaming API with the Account Activity API, which uses webhooks. In your Getting Started with webhooks document, the first step is "get your auth keys", which is fine. The second step refers the reader to [Securing webhooks](https://deve

dariusk /
Created Feb 23, 2018
Recommendations for ML5

Recommendations for ML5

Darius Kazemi, Feb 23 2018

After a few days of poking around at ML5 I have some recommendations for making it a healthier open source project. I am, of course, happy to sit down and talk through any of these recommendations in depth, but I thought I'd get them documented first.

Project management

These are project management, rather than technical, recommendations.

dariusk / osascomp.js
Created Sep 8, 2016
adjective order lists
View osascomp.js
var opinion = [
'beautiful', 'sweet', 'pretty', 'gorgeous', 'lovely', 'handsome', 'good', 'better', 'best', 'bad', 'worse', 'worst', 'wonderful', 'splendid', 'mediocre', 'awful', 'fantastic', 'ugly', 'clean', 'dirty', 'wasteful', 'difficult', 'comfortable', 'uncomfortable', 'valuable', 'worthy', 'worthless', 'useful', 'useless', 'important', 'evil', 'angelic', 'rare', 'scarce', 'poor', 'rich', 'disgusting', 'amazing', 'surprising', 'loathesome', 'unusual', 'usual', 'pointless', 'pertinent',
var size = [
'large', 'heavy', 'light', 'big', 'small', 'little', 'tiny', 'tall', 'short', 'fat', 'thin', 'slender', 'willowy', 'lean', 'svelte', 'scrawny', 'skeletal', 'underweight', 'lanky', 'wide', 'enormous', 'huge', 'vast', 'great', 'gigantic', 'monstrous', 'mountainous', 'jumbo', 'wee', 'dense', 'weighty', 'slim', 'trim', 'hulking', 'hefty', 'giant', 'plump', 'tubby', 'obese', 'portly',
var age = [
'young', 'old', 'baby', 'babyish', 'teenage', 'ancient', 'antique', 'old-fashioned', 'youthful', 'el
dariusk / pinboard.json
Last active Sep 2, 2016
View pinboard.json
"description":"Tiny Subversions","time":"2016-09-01T20:23:48Z","shared":"yes","toread":"yes","tags":"readability_import"},
dariusk / 0_reuse_code.js
Created Mar 11, 2016
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
dariusk / index.js
Created Feb 20, 2016
View index.js
var Twit = require('twit');
var T = new Twit(require('./config.js'));
var wordfilter = require('wordfilter');
var ent = require('ent');
var readability = require('readability-api');
consumer_key: 'CONSUMER_KEY',
consumer_secret: 'CONSUMER_SECRET'
dariusk /
Created Jan 12, 2016
Brief description of signed integers for IntermezzOS book

Signed integers exist because we need some way to store negative numbers in a computer. Imagine you have 32 bits of storage and you want to put data in there. We could put in 0x00000001 and say that represents 1 in decimal, as you might expect. If we subtract 1 from that, we get 0x00000000, which represents 0. But if we subtract 1 from 0, the bits "wrap around" and we get 0xFFFFFFFF -- this happens on the hardware level! The internal counter has nowhere to go so it wraps around to the top of the range of representable bits.

If we'd been representing this number as an unsigned integer, 0xFFFFFFFF would represent 4,294,967,295. This is the number you'd normally expect if you started from 0x00000000 and kept counting up until you got to 0xFFFFFFFF. So when we have an unsigned integer, 0 - 1 = 4,294,967,295. Which is weird and probably not what we want! A signed integer is just a convention that reserv