Skip to content

Instantly share code, notes, and snippets.

View irridescentrambler's full-sized avatar
🤓
Exploring

Nikhil Mohadikar irridescentrambler

🤓
Exploring
View GitHub Profile
@Kukunin
Kukunin / ractors.rb
Last active December 28, 2023 12:53
Ruby Ractors vs Threads benchmark
require 'benchmark'
require 'etc'
Ractor.new { :warmup } if defined?(Ractor)
def fibonacci(n)
return n if (0..1).include? n
fibonacci(n - 1) + fibonacci(n - 2)
end
@navid-taheri
navid-taheri / eb-cli-ubuntu-16-04
Last active July 6, 2023 14:19
How to install eb cli (awsebcli) on Ubuntu 16.04
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get install python3-setuptools
sudo easy_install3 pip
pip -V
#pip 9.0.1 from /usr/local/lib/python3.5/dist-packages/pip-9.0.1-py3.5.egg (python 3.5)
sudo chown -R username:username ~/.local/
# add to ./*shrc
@rafael-neri
rafael-neri / modals.html
Created December 4, 2014 20:36
Resolve Conflicts UI Frameworks - Modal Bootstrap and Semantic
<html>
<head>
<title>Resolve Conflicts UI Frameworks</title>
<!-- styles -->
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.1/css/bootstrap.min.css" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/semantic-ui/1.0.1/semantic.min.css" />
</head>
<body>
@lfender6445
lfender6445 / gist:9919357
Last active March 28, 2024 08:38
Pry Cheat Sheet

Pry Cheat Sheet

Command Line

  • pry -r ./config/app_init_file.rb - load your app into a pry session (look at the file loaded by config.ru)
  • pry -r ./config/environment.rb - load your rails into a pry session

Debugger

@marcusmalmberg
marcusmalmberg / CarrierWave.md
Last active June 14, 2021 23:22
Guide to setup CarrierWave which will upload a file to Amazon S3 in production environment and use local storage in development and test

CarrierWave home

https://github.com/jnicklas/carrierwave

This example will create an uploader that will upload a file stored in a model Model. The file will be stored locally in development and test environment and will use Amazon S3 in production.

CarrierWave installation

First add the gems.