Skip to content

Instantly share code, notes, and snippets.

View roman-m-work's full-sized avatar

Roman M roman-m-work

  • Israel
View GitHub Profile
brew install rbenv/tap/openssl@1.0
echo 'export PATH="/usr/local/opt/openssl@1.0/bin:$PATH"' >> ~/.zshrc
RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl@1.0)" rbenv install 2.5.5
@roman-m-work
roman-m-work / example.html
Last active November 27, 2019 19:21 — forked from bbg/example.html
jQuery upload image take the base64 code
<!DOCTYPE html>
<html>
<head>
<meta charset="utf8">
<title>Online Base64 encoder</title>
<script type="text/javascript" src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script type="text/javascript">
function readURL(input) {
if (input.files && input.files[0]) {
var reader = new FileReader();
@roman-m-work
roman-m-work / pre-commit.rb
Created January 22, 2017 13:25
Git pre-commit hook to prevent accidental mistakes
#!/usr/bin/env ruby
# vim: set syntax=ruby
TESTS = [
[
:has_no_staged_migrations,
%x[ git status -s| egrep "^\?\?\sdb\/migrate/.+\.rb$" ].empty?,
"You probably forgot to add newly created migrations."
],
[