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

Twitter gem overview

Adapted (formatting changes) from https://gist.github.com/mbd-s/2352b1454790852a6946dcb3842ec3d5

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
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.
#
# PREREQUISITES
#
@SeanTAllen
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.
And...
There's so much to learn:
@ericentin
ericentin / migrate.sh
Last active Nov 23, 2016
How to run Ecto migrations from an exrm release
View migrate.sh
./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
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
fi
@pnc
pnc / observer.md
Last active Oct 11, 2019
Using Erlang observer/appmon remotely
View observer.md

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
View cloud-provider-solutions.md
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
maxim / rails_load_path_tips.md
Last active Nov 19, 2019
How to use rails load paths, app, and lib directories.
View rails_load_path_tips.md

In Rails 3

NOTE: This post now lives (and kept up to date) on my blog: http://hakunin.com/rails3-load-paths

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
$('.js-add-list-popover').click();
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 + ')';
$('.js-list-name').val(cardName);
@juliepagano
juliepagano / 101_off_limits.md
Last active Dec 16, 2015
101 conversations I generally don't want to have...
View 101_off_limits.md

This list now exists over at http://juliepagano.com/blog/2013/11/02/101-off-limits/ 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.