Skip to content

Instantly share code, notes, and snippets.

View rojosinalma's full-sized avatar
🍜

Rojo rojosinalma

🍜
View GitHub Profile

The Freenode resignation FAQ, or: "what the fuck is going on?"

IMPORTANT NOTE:

It's come to my attention that some people have been spamming issue trackers with a link to this gist. While it's a good idea to inform people of the situation in principle, please do not do this. By all means spread the word in the communities that you are a part of, after verifying that they are not aware yet, but unsolicited spam is not helpful. It will just frustrate people.

Update 3 (May 24, 2021)

A number of things have happened since the last update.

@ChristopherA
ChristopherA / brew-bundle-brewfile-tips.md
Last active April 29, 2024 16:42
Brew Bundle Brewfile Tips

Brew Bundle Brewfile Tips

Copyright & License

Unless otherwise noted (either in this file or in a file's copyright section) the contents of this gist are Copyright ©️2020 by Christopher Allen, and are shared under spdx:Creative Commons Attribution Share Alike 4.0 International (CC-BY-SA-4.) open-source license.

Sponsor

If you more tips and advice like these, you can become a monthly patron on my GitHub Sponsor Page for as little as $5 a month; and your contributions will be multipled, as GitHub is matching the first $5,000! This gist is all about Homebrew, so if you like it you can support it by donating to them or becoming one of their Github Sponsors.

@Luv2C0d3
Luv2C0d3 / gist:05a2f33509998993336ccbbba0d92ce6
Last active November 3, 2022 12:36
Install Arch Linux + EFI + Gnome in VMware player VM
# Install Arch Linux on VMWare player 15
#
# References I used:
#
# Install Arch Linux on Dell XPS-13 (https://bit.ly/32P6t61):
# Has some of the BTRFS commands, but uses encryption.
# Install.txt file in Arch ISO image.
#
# Arch Linux Installation and Configuration on UEFI Machines (https://bit.ly/2PtvIY1):
# This tutorial includes same info as others, but also some network commands if you
@WJWH
WJWH / c10k.ru
Created October 15, 2018 09:12
The double hijack trick, serving 65k connections from a single ruby process
# This server demo does a socket hijack in Rack and then saves the socket to a global variable
# to prevent it from being GCed when the Puma thread ends. It will then write "BEEP" to each
# socket every ten seconds to prevent the connection timing out. During testing, it easily
# handled up to 65523 connections, after which it ran into the `ulimit` for open file descriptors.
# The bit with the waiting area is there because a normal `Set` is not thread safe and it would
# drop socket due to race conditions. The `Queue` is thread safe and will make sure all sockets
# are preserved.
# run with `rackup -q -p 8000 -o 0.0.0.0 c10k.ru`
# testing: install `ab` and then run `ab -c 20000 -n 20000 <ip adress of server>:8000/
#!/bin/bash
#modified from http://forum.ultra-star.de/viewtopic.php?f=13&t=11234
apt-get update
apt-get upgrade
#rpi-update
@shiroyasha
shiroyasha / dog.rb
Created February 16, 2016 22:20
Method tracer for Ruby classes
class Dog
attr_writer :name
def initialize(name)
@name = name
end
def bark
puts "patrick"
end
@rojosinalma
rojosinalma / predictionio_readme.md
Last active July 1, 2018 12:56
PredictionIO Install Instructions

PredictionIO Setup Guide

This is a pretty much self-noted guide to setting up PredictionIO in a cluster of 3 servers (for this guide in particular).

You can also setup more servers and distribute the services mentioned here differently, but for the scope of this guide I won't explain how to do that, although you might use the references here to guide yourself into doing that.

  1. Requirements: --
@bjorgvino
bjorgvino / yosemite ntfs read+write.txt
Last active December 2, 2021 03:58
osxfuse + ntfs-3g + Yosemite = NTFS R/W
Remove osxfuse if installed via homebrew:
> brew uninstall osxfuse
Install osxfuse binary and choose to install the MacFUSE compatibility layer:
http://sourceforge.net/projects/osxfuse/files/latest/download?source=files
Reboot (optional but recommended by osxfuse)
Install ntfs-3g via homebrew:
> brew update && brew install ntfs-3g
@mlanett
mlanett / rails http status codes
Last active May 3, 2024 04:15
HTTP status code symbols for Rails
HTTP status code symbols for Rails
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings.
Status Code Symbol
1xx Informational
100 :continue
101 :switching_protocols
102 :processing
@csfrancis
csfrancis / gdb_ruby_backtrace.py
Last active April 24, 2024 05:37
Dump an MRI call stack from gdb
# Updated for Ruby 2.3
string_t = None
def get_rstring(addr):
s = addr.cast(string_t.pointer())
if s['basic']['flags'] & (1 << 13):
return s['as']['heap']['ptr'].string()
else:
return s['as']['ary'].string()