Skip to content

Instantly share code, notes, and snippets.

View aishek's full-sized avatar
👨‍💻

Aleksandr Borisov aishek

👨‍💻
View GitHub Profile
@gmmoreira
gmmoreira / install.sh
Last active November 1, 2022 15:05
Install Ruby 2.2.x, 2.3.x in Ubuntu 20.04
#!/bin/bash
set -e
# Usage
# ./install.sh # defaults to 2.3.8
# ./install.sh 2.3.3
# Explanation
# Ruby 2.3 or lower only support OpenSSL 1.0.
@davydovanton
davydovanton / operations.md
Last active June 25, 2020 09:31
Operations

Пример из pepegramming канала

Задача

Есть экшен в рельсе, который создает инвойс:

def create
  invoice = Invoice.new(params[:invoice])

 if invoice.save
@meritt
meritt / retina.js
Created July 23, 2012 11:24
Detect retina screens
function isRetina() {
return (('devicePixelRatio' in window && devicePixelRatio > 1) || ('matchMedia' in window && matchMedia("(-moz-device-pixel-ratio:1.0)").matches));
}