Skip to content

Instantly share code, notes, and snippets.

View akostadinov's full-sized avatar

Aleksandar N. Kostadinov akostadinov

View GitHub Profile
yob /
Last active May 21, 2024 10:37
Installing ruby 3.0 with rbenv/ruby-build with openssl 3

Bllergh. This is a real pain.

The openssl extension that ships with ruby 3.0 only compiles against openssl <= 1.1, but now openssl 3.0 is shipped in debian testing/unstable.

Ruby bug here:

Version >= 3.0 of the openssl rubygem does compile against openssl 3.0 though.

I use rbenv to manage ruby versions on my system, which uses ruby-build to manage installs.

Maxattax97 /
Last active November 13, 2023 12:10 — forked from magnetikonline/
List all Git repository objects by size.

List all Git repository objects by size


Bash script to:

  • Iterate all commits made within a Git repository.
  • List every object at each commit.
andripwn / poc.js
Created January 23, 2020 16:29
PDF Bypass - Cross-site Scripting (XSS)
jazzytomato / mock_env.rb
Last active April 3, 2024 00:49
Simple method to mock environment variable in ruby with minitest or other testing framework
# in test_helper.rb (for example)
def mock_env(partial_env_hash)
old = ENV.to_hash
ENV.update partial_env_hash
ENV.replace old

Faking DNS from userland

To give false DNS responses from userland we need to handle different type of syscalls : gethostbyname(), gethostbyname2(), getaddrinfo(), getnameinfo(), etc. To cover all these cases, and to prevent leaks to real dns servers, we will use two libraries : libresolv_wrapper and libnss_wrapper.


Install resolv_wrapper and nss_wrapper, either from sources or from your favorite Linux distribution.

magnetikonline /
Last active June 22, 2024 06:03
List all Git repository objects by size.

List all Git repository objects by size


Bash script which will:

  • Iterate all commits made within a Git repository.
jkullick /
Last active December 29, 2016 13:28
Force Sector 63 Boundary in fdisk
fdisk -c=dos -u=cylinders /dev/sdb


jameslafa / debug.rake
Created July 11, 2016 12:58
Easily debug rake task
desc "switch rails logger to stdout"
task :verbose => [:environment] do
Rails.logger =
desc "switch rails logger log level to debug"
task :debug => [:environment, :verbose] do
Rails.logger.level = Logger::DEBUG
detiber / atomic-openshift-installer-config.yml
Last active August 30, 2018 17:17
openshift-ansible-installer config example
version: v3
variant: openshift-enterprise
variant_version: '3.1'
# The deployment key specifies the hosts and roles fo rthe deployment
# and configuration values that apply to the deployment as a whole
ansible_config: /usr/share/atomic-openshift-utils/ansible.cfg
ansible_log_path: /tmp/ansible.log
trevorrowe / client.rb
Created June 29, 2015 21:03
Ruby Net::HTTP Expect-100 continue PUT bug
require 'net/http'
require 'logger'
req ='/', { 'expect' => '100-continue' })
req.body = 'data'
http ='localhost', 3000)
http.continue_timeout = 1