Skip to content

Instantly share code, notes, and snippets.

View emaraschio's full-sized avatar
🏠
☕ 🤓

Ezequiel Maraschio emaraschio

🏠
☕ 🤓
View GitHub Profile
@kconner
kconner / macOS Internals.md
Last active November 13, 2024 07:51
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

# /home/jesuiswk/.config/tmuxinator/tm.yml
name: tm
root: ~/Documents/ThirtyMadison/
# Optional tmux socket
# socket_name: foo
# Note that the pre and post options have been deprecated and will be replaced by
# project hooks.
# this is useful for sending action cable updates to doctors portal
def spam(count, naptime)
patients = Patient.all.sample(count)
patients.each do |patient|
sleep(naptime) if naptime
Doctor.all.each do |doc|
DoctorSchema.subscriptions.trigger('patientUpdates', { doctorId: doc.id }, patient)
end
Homebrew has a services manager and can manage its own Java installation, so an easier way to do this is just
# this will install java 1.8, zookeeper, and kafka
brew install kafka
# this will run ZK and kafka as services
brew services start zookeeper
brew services start kafka
That's it. If you want to stop Kafka, just run the brew services commands in reverse:
@royshouvik
royshouvik / console.ts
Last active October 4, 2022 00:12
Nestjs REPL
import 'dotenv/config';
import { NestFactory } from '@nestjs/core';
import * as repl from 'repl';
import * as Logger from 'purdy';
const LOGGER_OPTIONS = {
indent: 2,
depth: 1,
};
@aniketsupertramp
aniketsupertramp / python_redis_migration_pool.py
Created April 8, 2019 17:56
Script for migrating redis keys from one shard to another
import redis
from itertools import izip_longest
import sys
from multiprocessing import Pool
import signal
OLD = "SHARD_ENDPOINT_FOR_OLD_REDIS"
NEW = "SHARD_ENDPOINT_FOR_NEW_REDIS"
@roninsyc
roninsyc / mailtrap_with_rails.md
Last active November 9, 2021 13:49
[Mailtrap with Rails] integrate mailtrap into rails #rails #mailtrap
EDITOR=vim rails credentials:edit
development:
  mailtrap:
    user_name: your_mailtrap_user_name
    password: your_mailtrap_password
    address: your_mailtrap_address
@jalkoby
jalkoby / my_awesome_rspec_hacks.rb
Created September 29, 2018 13:05
My awesome RSpec hacks
## Context + metadata
shared_context 'Logged as a user', role: true do
let(:user) { |example| create :user, example.metadata[:role] }
before { login_as user }
end
scenario "Login as a client", role: :client
scenario "Login as a customer", role: :customer
scenario "Login as an admin", role: :admin
@prestia
prestia / installing_MTGO_on_macOS_with_Retina_support.md
Last active November 4, 2024 16:49
Instructions on how to install Magic the Gathering Online on macOS with Retina support.

Installing MTGO on macOS using Wine, and making it look pretty!

The following instructions are heavily inspired by @pauleve. I modified his instructions and then added details about how to make a shortcut and support Retina/HiDPI displays.

Installing MTGO (and Wine and Homebrew and Xquartz and ...)

  1. Install Homebrew by opening Terminal and executing the following command:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"