Skip to content

Instantly share code, notes, and snippets.


Max Chernyak maxim

Block or report user

Report or block maxim

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
droberts-ada /
Last active Jul 13, 2019 — forked from mbd-s/
Building a simple Twitter bot with the Twitter Ruby gem

Twitter gem overview

Adapted (formatting changes) from

The Twitter Ruby gem is a Ruby interface to the Twitter API. It allows you to make all available Twitter API requests (e.g., tweet, follow a user, search, etc.) within a Rails app.

This guide was adapted from multiple sources, including the Twitter Ruby gem configuration page and How to Make a Twitter Bot in Ruby on Rails. Twitter's own API docs are a good resource too, of course.

Get set up with Twitter

maxim / gh-dl-release
Last active Nov 9, 2019
Download assets from private Github releases
View gh-dl-release
#!/usr/bin/env bash
# gh-dl-release! It works!
# This script downloads an asset from latest or specific Github release of a
# private repo. Feel free to extract more of the variables into command line
# parameters.
SeanTAllen / gist:7cbb72339806f3decee2
Last active Oct 7, 2015
The Tech "People" Bookclub
View gist:7cbb72339806f3decee2
Here's the idea,
You work in tech. You're in the NYC area.
You care about "people" issues. You think the hardest problem in computing is "people".
You are interested in how we work. How to structure work. How to work together.
How to help your colleagues succeed.
There's so much to learn:
ericentin /
Last active Nov 23, 2016
How to run Ecto migrations from an exrm release
./bin/turbo rpc Elixir.Ecto.Storage up "['Elixir.Turbo.Repo']."
./bin/my_app rpc Elixir.Mix.Ecto migrations_path "['Elixir.MyApp.Repo']."
# => <<"/opt/my_app/production/rel/my_app/lib/my_app-0.0.1/priv/repo/migrations">>
./bin/my_app rpc Elixir.Ecto.Migrator run "['Elixir.MyApp.Repo', <<\"/opt/my_app/production/rel/my_app/lib/my_app-0.0.1/priv/repo/migrations\">>, up, [{all, true}]]."
# => []
mbbx6spp / prepare-boot-drive-from-iso
Last active Feb 10, 2016
Prepare bootable (USB) drive on OS X. I validated this script on a Retina MBP running Yosemite.
View prepare-boot-drive-from-iso
#!/usr/bin/env bash
# Purpose: To create a bootable (USB) drive on OSX
# Note: For a NixOS 14.12 ISO (~330MB) to a 512MB USB drive, the last step (rsync) took over 3 minutes.
declare -r platform="$(uname -s)"
if [ "${platform}" != "Darwin" ]; then
>&2 echo "Error: This will not run on ${platform} (anything other than Darwin."
exit 1
pnc /
Last active Oct 11, 2019
Using Erlang observer/appmon remotely

Using OTP's observer (appmon replacement) remotely

$ ssh remote-host "epmd -names"
epmd: up and running on port 4369 with data:
name some_node at port 58769

Note the running on port for epmd itself and the port of the node you're interested in debugging. Reconnect to the remote host with these ports forwarded:

$ ssh -L 4369:localhost:4369 -L 58769:localhost:58769 remote-host
Problem AWS DigitalOcean
Network isolation Private Cloud/Security Groups tinc / n2n / freelan
Node initialization CloudInit/User Data ?
Node discovery EC2 API Serf
Pull app on scale More Like This Serf
Distributed config etcd etcd
maxim /
Last active Nov 19, 2019
How to use rails load paths, app, and lib directories.

In Rails 3

NOTE: This post now lives (and kept up to date) on my blog:

If you add a dir directly under app/

Do nothing. All files in this dir are eager loaded in production and lazy loaded in development by default.

If you add a dir under app/something/

View gist:5770291
// create new card
var d = new Date();
var year = (d.getFullYear()+'').substring(2);
var month = d.getMonth() + 1;
var day = d.getDate();
var cardName = 'Published (' + month + '-' + day + '-' + year + ')';
juliepagano /
Last active Dec 16, 2015
101 conversations I generally don't want to have...

This list now exists over at and will be updated there.

I keep saying that impromptu, unwanted feminism 101 discussions are exhausting and not a good use of my resources. Then people ask what I mean by 101, so I'm starting to make a list. This list will change over time - I recommend checking back.

I highly recommend checking this list before engaging with me about feminism if you're new to it. It'll save both of us a lot of time and frustration.

Diversity in tech

Women aren't equally represented in tech because biology

Nope. This argument is bad and the science does not support it. Unfortunately, every time you say this out loud, you are contributing to cultural problems that do decrease the number of women in tech.

You can’t perform that action at this time.