Skip to content

Instantly share code, notes, and snippets.

View bolshakov's full-sized avatar
💭
It doesn't matter what you create If you have no fun

Tëma Bolshakov bolshakov

💭
It doesn't matter what you create If you have no fun
  • Toptal
  • Barcelona, Spain
View GitHub Profile
@Ryanb58
Ryanb58 / install.md
Last active May 17, 2024 13:42
How to install telnet into a alpine docker container. This is useful when using the celery remote debugger in a dev environment.
>>> docker exec -it CONTAINERID /bin/sh
/app # telnet
/bin/sh: telnet: not found

/app # apk update
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
v3.7.0-243-gf26e75a186 [http://dl-cdn.alpinelinux.org/alpine/v3.7/main]
v3.7.0-229-g087f28e29d [http://dl-cdn.alpinelinux.org/alpine/v3.7/community]
anonymous
anonymous / singleton.cr
Created October 3, 2017 05:14
Crystal Lang singleton
class Singleton
@@instance : Nil | Singleton
@@instance = nil
def self.new
@@instance ||= Singleton.allocate.tap(&.initialize)
@@instance.as(Singleton)
end
end
@fernandoaleman
fernandoaleman / fix-libv8-mac.txt
Created May 5, 2016 15:14
Fixing libv8 and therubyracer on Mac
brew tap homebrew/versions
brew install v8-315
gem install libv8 -v '3.16.14.13' -- --with-system-v8
gem install therubyracer -- --with-v8-dir=/usr/local/opt/v8-315
bundle install
@havenwood
havenwood / require_relative_with_tco.rb
Last active September 14, 2021 04:22
A #require_relative_with_tco that's like #require_relative but with tail call optimization
module Kernel
def require_relative_with_tco file
absolute_path = File.absolute_path file, __dir__
realpath = File.realpath "#{absolute_path.chomp '.rb'}.rb"
if $LOADED_FEATURES.include? realpath
false
else
RubyVM::InstructionSequence.compile_file(
realpath,
@timothyandrew
timothyandrew / README.md
Last active December 16, 2023 17:05
Set up a seedbox (on DigitalOcean – Ubuntu) really quick

Introduction

  • This script lets you set up and use a temporary DigitalOcean droplet to download torrent files.
  • Once downloaded, they can be streamed down to your local machine.
  • This uses transmission-cli for the torrent client, and nginx to serve files.

Setup on Local Machine

  • This assumes that you have a DigitalOcean account and tugboat set up, as well as seedbox-setup.sh present in the current directory.