Skip to content

Instantly share code, notes, and snippets.

@jonforums
jonforums / arch.txt
Last active August 29, 2015 13:56
Arch and Ubuntu Server client VM increased console size
sudo vim /etc/default/grub
GRUB_GFXMODE=1024x768x24
sudo grub-mkconfig -o /boot/grub/grub.cfg
sudo vim /etc/vconsole.conf
KEYMAP='us'
FONT='Lat15-TerminusBold24x12'
# ensure Lat15-TerminusBold24x12 is in /usr/share/kbd/consolefonts
@jonforums
jonforums / chroot_sftp
Last active August 29, 2015 13:56
Chrooted SFTP users setup
# New SFTP users are chrooted by OpenSSH in their homes rooted at /srv/sdrop.
# Home directories are owned by root and not writeable by any other user. To
# allow SFTP users to upload files, an `uploads` subdir owned by the SFTP user
# is created in each user's home dir. Ensure /usr/sbin/nologin is listed in
# /etc/shells
sudo addgroup sftp
sudo useradd -s /usr/sbin/nologin -d /srv/sdrop/xfer -G sftp -M xfer
sudo passwd xfer
@jonforums
jonforums / gist:340718
Created March 23, 2010 00:20
Benchmark big reads
# redmine.ruby-lang.org issue #2742
require 'benchmark'
begin
require 'rbconfig'
puts "(#{RbConfig::CONFIG['host_os']}) #{RUBY_VERSION}-p#{RUBY_PATCHLEVEL} \
#{RbConfig::CONFIG['CC']} #{RbConfig::CONFIG['optflags']} #{RbConfig::CONFIG['debugflags']}"
rescue LoadError
end
@jonforums
jonforums / gist:340719
Created March 23, 2010 00:22
Benchmark big write
# redmine.ruby-lang.org issue #2742
require 'benchmark'
begin
require 'rbconfig'
puts "(#{RbConfig::CONFIG['host_os']}) #{RUBY_VERSION}-p#{RUBY_PATCHLEVEL} \
#{RbConfig::CONFIG['CC']} #{RbConfig::CONFIG['optflags']} #{RbConfig::CONFIG['debugflags']}"
rescue LoadError
end
@jonforums
jonforums / dk.rb
Created July 16, 2010 21:21
DevKit install helper script
require 'win32/registry'
require 'yaml'
require 'fileutils'
module DevKitInstaller
DEVKIT_ROOT = File.expand_path(File.dirname(__FILE__))
REG_KEYS = [
'Software\RubyInstaller\MRI',
diff --git a/config/ruby_installer.rb b/config/ruby_installer.rb
index cc18270..c8db950 100644
--- a/config/ruby_installer.rb
+++ b/config/ruby_installer.rb
@@ -226,7 +226,7 @@ module RubyInstaller
:release => 'official',
:version => '1.3.7',
:url => 'http://rubyforge.org/frs/download.php/70696',
- :checkout => 'http://rubygems.rubyforge.org/svn/trunk',
+ :checkout => 'git://github.com/rubygems/rubygems.git',
@jonforums
jonforums / 0001-allow-trunk-build-with-rubygems.patch
Created July 26, 2010 13:54
Allow Ruby trunk build with Rubygems
diff --git a/config/ruby_installer.rb b/config/ruby_installer.rb
index cc18270..c6834c9 100644
--- a/config/ruby_installer.rb
+++ b/config/ruby_installer.rb
@@ -226,7 +226,7 @@ module RubyInstaller
:release => 'official',
:version => '1.3.7',
:url => 'http://rubyforge.org/frs/download.php/70696',
- :checkout => 'http://rubygems.rubyforge.org/svn/trunk',
+ :checkout => 'http://github.com/rubygems/rubygems.git',
@jonforums
jonforums / 0001-enable-llvm-gcc-vim-builds.patch
Created August 7, 2010 17:51
Enable LLVM-GCC to build gvim and vim
diff --git a/src/GvimExt/Make_ming.mak b/src/GvimExt/Make_ming.mak
--- a/src/GvimExt/Make_ming.mak
+++ b/src/GvimExt/Make_ming.mak
@@ -33,7 +33,7 @@
endif
endif
CXX := $(CROSS_COMPILE)g++
-WINDRES := $(CROSS_COMPILE)windres
+WINDRES := $(CROSS_COMPILE)windres --preprocessor="$(CXX) -E -xc" -DRC_INVOKED
LIBS := -luuid
@jonforums
jonforums / 0001-build-with-jruby.patch
Created August 18, 2010 18:58
Build RubyInstaller 1.9 with JRuby patch
diff --git a/recipes/interpreter/ruby19.rake b/recipes/interpreter/ruby19.rake
index 755f644..b63d1b8 100644
--- a/recipes/interpreter/ruby19.rake
+++ b/recipes/interpreter/ruby19.rake
@@ -83,8 +83,10 @@ namespace(:interpreter) do
end
end
+ ruby_impl = Gem.ruby
+
diff --git a/syntax/ruby.vim b/syntax/ruby.vim
index ece2f4f..283f04e 100644
--- a/syntax/ruby.vim
+++ b/syntax/ruby.vim
@@ -253,7 +253,7 @@ endif
" Special Methods
if !exists("ruby_no_special_methods")
- syn keyword rubyAccess public protected private module_function
+ syn keyword rubyAccess public protected private module_function private_class_method