This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'vips' | |
input_image = Vips::Image.new_from_file('all_pics.webp') | |
x = 0 | |
y = 0 | |
width = 100 | |
height = 100 | |
gap = 28 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"byebug": { | |
"prefix": "bb", | |
"body": [ | |
"byebug" | |
], | |
"description": "Insert byebug call" | |
}, | |
"pry": { | |
"prefix": "bp", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"Interpolate ruby": { | |
"prefix": "ir", | |
"body": [ | |
"<%= $1 %>" | |
], | |
"description": "Interpolate" | |
}, | |
"Insert bracket pair ruby": { | |
"prefix": "irp", | |
"body": [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh-add ~/.ssh/id_rsa | |
ssh -vT [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git branch --merged | grep -v "\*" | xargs -n 1 git branch -d && git remote prune origin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=begin | |
USAGE: ruby-rewrite -l controller_actions_keyword_args.rb -m <FILE> | |
This rewriter moves your Rails controller tests from `get action, params, session, flash` to | |
`get action, params: params, session: session, flash: flash`. | |
Which is needed if you see the following message in your Rails 5.0 tests : | |
DEPRECATION WARNING: Using positional arguments in functional tests has been deprecated, | |
in favor of keyword arguments, and will be removed in Rails 5.1. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git branch --merged | grep -v "\*" | xargs -n 1 git branch -d && git remote prune origin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem install nokogiri -v '1.9.1' -- --with-iconv-dir=/usr/local/Cellar/libiconv/1.15 --use-system-libraries --with-xml2-include=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/libxml2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
opportunities.id "opp_id", | |
title, | |
expiry_date, | |
ROW_NUMBER() OVER dupes, | |
FIRST_VALUE(opportunities.id) OVER dupes "parent" | |
FROM opportunities | |
WINDOW dupes AS (PARTITION BY opportunities.title, opportunities.expiry_date ORDER BY opportunities.created_at) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set bytea_output to 'escape'; | |
-- delete | |
select session_id, decode(data, 'base64')::text | |
from sessions | |
where decode(data, 'base64')::text ilike '%return_to%' | |
and decode(data, 'base64')::text ilike '%password%new%'; |
NewerOlder