Tag Cloud
Currently Reading
Latest Book Reviews
- Certified Kubernetes Application Developer (CKAD) Study Guide, 2nd Edition Posted on January 11, 2025
- Rancher Deep Dive Posted on March 31, 2023
- Leveraging Kustomize for Kubernetes Manifests Posted on March 24, 2023
- Automating Workflows with GitHub Actions Posted on October 13, 2022
- Deep-Dive Terraform on Azure Posted on August 30, 2022 All Book Reviews
Latest Posts
- 301 URL redirect on Ruby on Rails Posted on May 5, 2012
- Enabling Terminal Coloring in Mac OS X Snow Leopard Posted on April 20, 2012
- Enabling locate database in Mac OS X Snow Leopard Posted on April 9, 2012
- Building mysql2 gem in Ubuntu issue Posted on April 7, 2012
- Basic ARP Manipulation Posted on February 24, 2012
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
ruby
]
April 20, 2012
Enabling Terminal Coloring in Mac OS X Snow Leopard
by Alpha01
File ~/.bash_profile
.
export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced
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
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
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
networking
security
]