Skip to content

Instantly share code, notes, and snippets.

💭
See my social media for status.

Aria Stewart aredridel

💭
See my social media for status.
Block or report user

Report or block aredridel

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@aredridel
aredridel / cors.md
Created Apr 25, 2019
This month's attemt to explain CORS.
View cors.md

It sure would be a shame if say, if you clicked a link, the page that loaded could just talk to the whole internet from your computer, right? Imagine the malice.

So browsers stop that shit cold. Nobody would use 'em if every time you got on the web it stole your TV.

Now, javascript can do some limited stuff, since CORS hasn't existed since the dawn of time and it would break large chunks of the web if this suddenly stopped working. It can:

  • Submit forms
  • Load scripts (and therefore make a GET request) from any site.
  • Make any requests back to the site it came from.
View gist:449658c228debbd10bb941d1832ad22b

Things Queer Culture Teaches That Straight Culture Doesn’t:

You don’t have to get married if you don’t want to. You don't have to have kids if you don’t want to.

It's nobody’s job to flirt with you or be flirted with. If you’re into someone, do the work and tell them.

Your clothing and hair and other style choices are to make YOU feel good first and foremost.

Signaling to your people is the secondary job of hair and clothes. But don’t dress for them. Be you, they’ll see it.

@aredridel
aredridel / smtpd.conf
Created Aug 4, 2017
Complete opensmtpd config to make a server just archive everything it receives. Requires a user named archive to be present on the system and own that directory.
View smtpd.conf
listen on ::
table aliases file:/etc/aliases
table anyone { "@" = archive }
accept for local alias <aliases> deliver to mbox
accept from any for any virtual <anyone> deliver to maildir "/var/lib/archive/%{rcpt:lowercase|strip}"
@aredridel
aredridel / idea.md
Last active Mar 15, 2017
twitter abuse prevention?
View idea.md

Know how the network clusters. Then when someone's reported, see how the clusters relate. Finding the source isn't too many hops. That'll help find the inciteful players -- the Milos, for example. It won't find people who organize in another medium, but are unrelated on Twitter. But second order analysis of who piles on connects them. Another mode of clustering.

In either case, be more suspicious based on (network) distance.

Then on the product design side: Make a way to separate users, and their first order follows. You report someone & computation checks it out as from a far cluster, and especially if it can find an inciting event? Just block those mentions. Like don't even let the tweet be posted. Gonna mention someone's username? Then you gotta not be a jackass.

It's reactive, mostly automated, but it takes reports seriously. It can eliminate the pile-on effect, especially if you run the algorithm proactively when someone's rate of mentions goes way up.

Also rate-limit non-conversational mentions b

View painful-upgrade
npm-website@4.1.0 /Users/aredridel/Projects/npm/npm-website
├─┬ @npmcorp/dr-frankenstyle@1.1.0
│ └─┬ vinyl-fs@1.0.0
│ ├─┬ glob-watcher@0.0.8
│ │ └─┬ gaze@0.5.2
│ │ └─┬ globule@0.1.0
│ │ └─┬ glob@3.1.21
│ │ └── graceful-fs@1.2.3
│ └── graceful-fs@3.0.8
├─┬ geoip-ultralight@0.1.3
View h.html
<script src=t1.js></script>
<script src=t2.js></script>
View gist:936634400599cd633d5d
0 info it worked if it ends with ok
1 verbose cli [ '/home/users/aredridel/Library/node/lib/node_modules/node-bin/bin/node',
1 verbose cli '/home/users/aredridel/Library/node/bin/npm',
1 verbose cli 'rm',
1 verbose cli 'node-bin' ]
2 info using npm@3.5.3
3 info using node@v5.1.0
4 silly loadCurrentTree Starting
5 silly install loadCurrentTree
6 silly install readLocalPackageData
@aredridel
aredridel / README.md
Last active May 16, 2019
How to use npm version lifecycle scripts to make sure that publishes make it back to git
View README.md

The problem

you bump the version of your package and publish to npm; the new version rolls out to users. However, you never make a tag, or forget to push it to github, so there's no record outside of npm that this has happened.

A solution using npm version lifecycle scripts

Add a script like this to your package.json:

View promise-tap.js
var P = require('bluebird');
var tap = require('tap');
var pt = wrap(tap);
function wrap(orig) {
return Object.create(orig, {
test: {
value: function(name, options, cb) {
if (!cb) {
cb = options;
View Senegal Stew with Millet
Serves 4.
2 tablespoons vegetable oil
2 cups coarsely chopped cabbage
1 cup chopped onions
2 cloves of garlic, minced
1/2 teaspoon ground red pepper
1/2 teaspoon curry powder
1/4 teaspoon dried thyme
1 can (14.4 oz) whole peeled tomato (with juice)
You can’t perform that action at this time.