Skip to content

Instantly share code, notes, and snippets.

View geewiz's full-sized avatar

Jochen Lillich geewiz

View GitHub Profile
@geewiz
geewiz / sms_chunker.rb
Created August 24, 2020 10:13
Julian's challenge, solution 1
#! env ruby
require "rspec/autorun"
require "byebug"
class SMScarrier
def self.deliver(text, to, from)
puts "From: #{from}"
puts "To: #{to}"
puts "Message: #{text}"
@geewiz
geewiz / monit-exception.md
Last active May 26, 2020 11:31
monit exception raised in StringBuffer_free at src/util/StringBuffer.c:103

Using Monit 5.16 (stock package Ubuntu 16.04), this configuration:

Process Name          = php7.1-fpm
 Pid file             = /var/run/php/php7.1-fpm.pid
 Monitoring mode      = active
 Start program        = '/usr/sbin/service php7.1-fpm start' timeout 30 second(s)
 Stop program         = '/usr/sbin/service php7.1-fpm stop' timeout 30 second(s)
 Restart program      = '/usr/sbin/service php7.1-fpm restart' timeout 30 second(s)
 Existence            = if does not exist then restart
@geewiz
geewiz / Rakefile
Created March 1, 2020 12:40
My Rake tasks for Rails apps
# frozen_string_literal: true
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically
# be available to Rake.
require File.expand_path("config/application", __dir__)
Rails.application.load_tasks
task default: :test
@geewiz
geewiz / extract-drupal.sh
Created May 26, 2019 12:24
Extract a Drupal application from a monorepo
git filter-branch --prune-empty --subdirectory-filter path/to/drupal
@geewiz
geewiz / Real ERA
Last active December 11, 2018 14:57
407 178.63.121.197
139 178.63.121.197
1114 178.63.121.197
126 178.63.121.197
718 178.63.121.197
707 178.63.121.197
135 178.63.121.197
396 178.63.121.197
1323 178.63.121.197
1121 178.63.121.197

Keybase proof

I hereby claim:

  • I am geewiz on github.
  • I am geewiz (https://keybase.io/geewiz) on keybase.
  • I have a public key ASDjU-ytMGgVp_hRvfZT2zAQkjWiUoCx3EUtvbEKeXTfSAo

To claim this, I am signing this object:

#!/bin/bash -e
# Install brew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
BREW="brew install"
$BREW git
$BREW autojump
$BREW mobile-shell
@geewiz
geewiz / Preferences.sublime-settings
Created August 28, 2014 14:50
My Sublime Text 3 configuration
{
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
"font_face": "Source Code Pro",
"font_size": 15.0,
"ignored_packages":
[
"Vintage",
"Markdown"
],
"tab_size": 2,
@geewiz
geewiz / fs.rb
Created January 2, 2012 14:54
Chef recipe to set noexec option for /dev/shm
# remount /dev/shm
execute "remount_shm" do
action :nothing
command "mount -o remount /dev/shm"
end
# set noexec for /dev/shm
bash "shm_noexec" do
user "root"
cwd "/etc"