Skip to content

Instantly share code, notes, and snippets.

View JuanitoFatas's full-sized avatar
🧸
Building Buildkite

Juanito JuanitoFatas

🧸
Building Buildkite
View GitHub Profile
@pcreux
pcreux / pipable.rb
Last active June 12, 2018 17:08
*nix has pipes, Elixir has pipes, Ruby deserves pipes.
# Elixir has pipes `|>`. Let's try to implement those in Ruby.
#
# I want to write this:
#
# email.body | RemoveSignature | HighlightMentions | :html_safe
#
# instead of:
#
# HighlightMentions.call(RemoveSignature.call(email.body)).html_safe
#
@tmm1
tmm1 / sample.gif
Last active December 11, 2020 07:40
View Profiler
sample.gif
@postmodern
postmodern / git_file_filter.sh
Last active April 1, 2022 23:13
A `git filter-branch` script for extracting arbitrary files in a repo.
#!/bin/bash
#
# usage: git filter-branch --force --prune-empty --index-filter "$(cat git_file_filter.sh)" --tag-name-filter cat -- --all
#
shopt -s globstar
whitelist=(
# files and globs go here
)

package.el

Before Emacs 24 the only way to benefit from third party elisp packages was to copy them to your configuration. RMS always opposed a package manager in Emacs because it would make it too easy to install non-free additions (this might not be a 100% accurate represetation of what happened, it’s what I remember hearing/reading).

In any case, Emacs 24 shipped with package.el, so now there’s a package manager. You can do M-x list-packages and it will fetch a list of packages from one or more package repositories. You find the package you want, type i, then x and it installs.

repositories

There are a few different repositories. The “official” one from GNU is called ELPA. The most popular one with lots more than ELPA is MELPA. Here is how you add MELPA to your config:

# Activate the gem you are reporting the issue against.
require 'active_record'
require 'minitest/autorun'
require 'logger'
# Ensure backward compatibility with Minitest 4
Minitest::Test = MiniTest::Unit::TestCase unless defined?(Minitest::Test)
# This connection will do for database-independent bug reports.
ActiveRecord::Base.establish_connection(adapter: 'postgresql', database: 'test123')
@senny
senny / 01_pg_guide_examples.md
Last active August 29, 2015 13:56
Active Record PostgreSQL guide examples.

Active Record PostgreSQL Examples

These are the examples used in the Active Record PostgreSQL guide. They are executable and verifiable.

@xaviershay
xaviershay / github_requests.md
Last active July 8, 2024 15:14
Pull request feature requests

Hello Github,

Pull requests are not serving me well on large reviews. Here are some problems and suggested enhancements that would make me happy.

  • Mark comment as "resolved" (see google docs for an example). As code changes, comments get lost or made redundant, and it is not clear (to either the author or reviewers) which are still relevant and which have been addressed. Resolving a comment doesn't need to make it dissappear, but I need to be able to see "which comments have not been addressed" somehow. This feature would be the most useful to me.
  • Reply to a comment. This can be done in effect on line comments (assuming there is only one), but cannot on PR comments. Particularly with many threads, the lack of this makes a review hard to follow.
  • Explicit "approve/block" life cycle. The block is actually more important to me ... often on a PR that has been incrementally improved I want to "block" final merge of it until I get a chance to rebase/squash and generally pretty it up. The block can be over
# .railsrc
-B #Skip Bundle
-T #Skip Test-Unit
-d postgresql #Use postgres
Ruby 2.1.0 in Production: known bugs and patches
Last week, we upgraded the github.com rails app to ruby 2.1.0 in production.
While testing the new build for rollout, we ran into a number of bugs. Most of
these have been fixed on trunk already, but I've documented them below to help
anyone else who might be testing ruby 2.1 in production.
@naruse I think we should backport these patches to the ruby_2_1 branch and
release 2.1.1 sooner rather than later, as some of the bugs are quite critical.
I'm happy to offer any assistance I can to expedite this process.
@XVilka
XVilka / TrueColour.md
Last active March 3, 2025 14:09
True Colour (16 million colours) support in various terminal applications and terminals

THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.

PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!