Skip to content

Instantly share code, notes, and snippets.

View gregors's full-sized avatar

Gregory Ostermayr gregors

  • internetz
View GitHub Profile
@gregors
gregors / setup.sh
Created February 11, 2024 17:06 — forked from Gazler/setup.sh
sysctl -w fs.file-max=12000500
sysctl -w fs.nr_open=20000500
ulimit -n 4000000
sysctl -w net.ipv4.tcp_mem='10000000 10000000 10000000'
sysctl -w net.ipv4.tcp_rmem='1024 4096 16384'
sysctl -w net.ipv4.tcp_wmem='1024 4096 16384'
sysctl -w net.core.rmem_max=16384
sysctl -w net.core.wmem_max=16384
wget http://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb
sudo dpkg -i erlang-solutions_1.0_all.deb
@gregors
gregors / readme.md
Created August 15, 2022 04:20 — forked from hansonkd/readme.md
Redis vs HTTP benchmark

Redis vs HTTP Benchmarks

See the original blog post

Results:

Name                           ips        average  deviation         median         99th %
redix_pool                   70.44       14.20 ms    ±36.07%       13.30 ms       50.60 ms
run_redix_pipeline 30.56 32.73 ms ±65.74% 47.26 ms 91.99 ms
@gregors
gregors / reinstall_drivers.bash
Created August 13, 2022 17:57 — forked from bartlomiejdanek/reinstall_drivers.bash
ubuntu - sound cart - reinstall drivers
#!/bin/bash
sudo su
apt-get --purge remove linux-sound-base alsa-base alsa-utils
apt-get install linux-sound-base alsa-base alsa-utils
apt-get install gdm ubuntu-desktop
reboot
$ du -h big.log
967M big.log
$ time cat big.log | ruby wp.rb | wc -l
54663
real 0m36.783s
user 0m36.596s
sys 0m0.757s
@gregors
gregors / rnb.erb
Created January 20, 2019 21:19 — forked from romainl/_rnb.md
RNB, a Vim colorscheme template
<%
# RNB, A VIM COLORSCHEME TEMPLATE
# Author: Romain Lafourcade (https://github.com/romainl)
# Canonical URL: https://gist.github.com/romainl/5cd2f4ec222805f49eca
# This template is designed to help vimmers create their own colorschemes
# without much effort.
#
# You will need Ruby to generate your colorscheme but Ruby knowledge is
# not needed at all.
# osx
# Install Nvidia web driver
# I got the following
http://www.nvidia.com/content/DriverDownload-March2009/confirmation.php?url=/Mac/Quadro_Certified/378.10.10.10.25.102/WebDriver-378.10.10.10.25.102.pkg&lang=us&type=GeForce
# The latest are here:
# Look for "Quadro & GeForce macOS Driver Release etc"

Keybase proof

I hereby claim:

  • I am gregors on github.
  • I am gregors (https://keybase.io/gregors) on keybase.
  • I have a public key ASC_N59h1YW7m9VMNB9cUxRTy1r2lKO6B87M4rSQms4KVQo

To claim this, I am signing this object:

require 'rubygems'
require 'mechanize'
FIRST_NAME = 'FIRST_NAME'
LAST_NAME = 'LAST_NAME'
PHONE = 'PHONE'
EMAIL = 'EMAIL@provider.com'
PARTY_SIZE = 2
SCHEDULE_RANGE = { :start_time => '19:00', :end_time => '20:30' }
@gregors
gregors / connect_heroku_to_amazon_rds
Last active August 26, 2015 01:51 — forked from jonyt/connect_heroku_to_amazon_rds
How to connect a Heroku application to an Amazon RDS Postgresql instance
Download the certificate with:
`wget -O config/rds-combined-ca-bundle.pem http://s3.amazonaws.com/rds-downloads/rds-combined-ca-bundle.pem`
Then connect with:
`postgres://user:password@amazon-host/db_name?sslmode=require&sslrootcert=config/rds-combined-ca-bundle.pem`
References:
http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.SSL
https://github.com/jeremyevans/sequel/issues/897
http://www.postgresql.org/docs/9.3/static/libpq-connect.html#LIBPQ-CONNECT-SSLROOTCERT
http://dba.stackexchange.com/questions/77811/how-to-connect-to-an-amazon-postgresql-database-using-ssl
@gregors
gregors / gist:3724377
Created September 14, 2012 20:05
ubuntu Qt install for webkit
# install needed libs
sudo apt-get install -y build-essential
sudo apt-get install -y libxrender-dev
sudo apt-get install -y libxext-dev
sudo apt-get install -y xvfb
# get qt4.7
wget ftp://ftp.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.7.4.tar.gz
# extract the files