Skip to content

Instantly share code, notes, and snippets.

View ivoanjo's full-sized avatar

Ivo Anjo ivoanjo

View GitHub Profile
@lloeki
lloeki / loggable.rb
Created January 21, 2022 18:00
Loggable Ruby module
require 'logger'
module Core
def self.logger
@logger ||= Loggable::Logger.new(STDOUT, progname: name, level: Logger::DEBUG)
end
end
module Loggable
class Logger < ::Logger
@lloeki
lloeki / Gemfile
Last active January 17, 2022 08:53
Bundler 1.17 / Rubygems 3.0 linux-musl resolution
# This fixes the platform value for rubygems 3.x, allowing bundler and gem install
# to properly resolve to: a) linux on linux, and b) to linux-musl on linux-musl
# with a fallback to linux if there's no linux-musl gem published.
#
# This works when there is no extension to build that would try to query the
# current Ruby platform through Rubygems (because building an extension spawns an
# independent Ruby interpreter)
#
# The second file in this gist is a patch to apply to Rubygems 3.0.3.1, e.g for
# official Docker Hub images:
@apangin
apangin / HotSpot JVM intrinsics
Last active May 11, 2023 18:32
HotSpot JVM intrinsics
_hashCode java/lang/Object.hashCode()I
_getClass java/lang/Object.getClass()Ljava/lang/Class;
_clone java/lang/Object.clone()Ljava/lang/Object;
_dabs java/lang/Math.abs(D)D
_dsin java/lang/Math.sin(D)D
_dcos java/lang/Math.cos(D)D
_dtan java/lang/Math.tan(D)D
_datan2 java/lang/Math.atan2(DD)D
_dsqrt java/lang/Math.sqrt(D)D
_dlog java/lang/Math.log(D)D
@kkszysiu
kkszysiu / gist:247c42dc9fd1d34a70a1
Last active June 24, 2021 03:52
Torchlight Linux
If you want to play on HumbleBundle edition of Torchlight you need old libSDL2 library.
Someone forgotten about that.
With latests libSDL2 it won't work. You will have issues with mouse pointer.
Cursor will have black outline. You won't be able to click on anything etc.
So I prepared modified libSDL2 lib which will able you to play this game with no issues.
https://drive.google.com/file/d/0B1WBC6JhUyLKZDRrTkxMVzA3S28/edit?usp=sharing
That's those libSDL libs. You need to copy it to lib64 dir where you've installed Torchlight, in my case it was /home/kkszysiu/.games/Torchlight/lib64/
@davidnunez
davidnunez / gist:1404789
Created November 29, 2011 13:20
list all installed packages in android adb shell
pm list packages -f