rubysecurity.org

Cloud Architect / DevOps Engineer / SRE / Developer | /root

Home About Books Blog Portfolio Archive

Tag Cloud


Currently Reading

Certified Kubernetes Administrator (CKA) Study Guide
Certified Kubernetes Administrator (CKA) Study Guide
38 / 155 Pages


Latest Book Reviews

Latest Posts


May 5, 2012

301 URL redirect on Ruby on Rails

by Alpha01

In your respective controller, specify the method of the view in questioned that needs to be redirected.

def code
   headers["Status"] = "301 Moved Permanently"
   redirect_to "https://www.example.com/alpha01"
 end
Tags: [ ruby ]
April 20, 2012

Enabling Terminal Coloring in Mac OS X Snow Leopard

by Alpha01

File ~/.bash_profile.

export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced
Tags: [ macos ]
April 9, 2012

Enabling locate database in Mac OS X Snow Leopard

by Alpha01

sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist
Tags: [ macos ]
April 7, 2012

Building mysql2 gem in Ubuntu issue

by Alpha01

Error

Installing mysql2 (0.3.11) with native extensions 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

        /home/tony/.rvm/rubies/ruby-1.9.3-p125/bin/ruby extconf.rb 
checking for rb_thread_blocking_region()... yes
checking for rb_wait_for_single_fd()... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lm... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lz... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lsocket... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lnsl... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lmygcc... no
checking for mysql_query() in -lmysqlclient... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
	--with-opt-dir
	--with-opt-include
	--without-opt-include=${opt-dir}/include
	--with-opt-lib
	--without-opt-lib=${opt-dir}/lib
	--with-make-prog
	--without-make-prog
	--srcdir=.
	--curdir
	--ruby=/home/tony/.rvm/rubies/ruby-1.9.3-p125/bin/ruby
	--with-mysql-config
	--without-mysql-config
	--with-mysql-dir
	--without-mysql-dir
	--with-mysql-include
	--without-mysql-include=${mysql-dir}/include
	--with-mysql-lib
	--without-mysql-lib=${mysql-dir}/lib
	--with-mysqlclientlib
	--without-mysqlclientlib
	--with-mlib
	--without-mlib
	--with-mysqlclientlib
	--without-mysqlclientlib
	--with-zlib
	--without-zlib
	--with-mysqlclientlib
	--without-mysqlclientlib
	--with-socketlib
	--without-socketlib
	--with-mysqlclientlib
	--without-mysqlclientlib
	--with-nsllib
	--without-nsllib
	--with-mysqlclientlib
	--without-mysqlclientlib
	--with-mygcclib
	--without-mygcclib
	--with-mysqlclientlib
	--without-mysqlclientlib

Fix

sudo apt-get install libmysqld-pic
Tags: [ ruby mysql ubuntu ]
February 24, 2012

Basic ARP Manipulation

by Alpha01

Add a temporary ARP entry to a hosts ARP cace

arp -s 192.168.1.145 00:02:03:F6:7C:4B temp

Permanent static entry (not temporary: NO “temp”)

arp -s 192.168.1.145 00:02:03:F6:7C:4B
Tags: [ networking security ]