start new:
tmux
start new with session name:
tmux new -s myname
#!/bin/bash | |
# USAGE: Will create a .tar.gz with CSVs of all tables in schema. | |
# Configure below and run as root (i.e. the user mysql runs as) | |
# | |
# The script will (or should) SELECT * INTO OUTFILE your tables | |
# and save them into csv files under /tmp dir first, then name them | |
# like the tables and move them thogether into a directory. Then | |
# it will tar everything together and chown you the tarball. | |
# Schema to export: |
backup: # mysqldump -u root -p[root_password] [database_name] > dumpfilename.sql | |
restore:# mysql -u root -p[root_password] [database_name] < dumpfilename.sql |
http://ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-you/ |
#Linux | |
echo dir1 dir2 dir3 | xargs -n 1 cp file1 | |
#Windows | |
for /d %F in (e:\*) do @if /i "%F" neq "e:\wav" 2>nul xcopy "%F\*.wav" "e:\wav" |
#Exec | |
$ irb | |
>> exec 'echo "hello $HOSTNAME"' | |
hello nate.local | |
$ | |
#System | |
$ irb | |
>> system 'echo "hello $HOSTNAME"' |
rdesktop -u username -g 1024×768 servername |
set nocompatible " Disable vi-compatibility | |
set t_Co=256 | |
colorscheme xoria256 | |
set guifont=menlo\ for\ powerline:h16 | |
set guioptions-=T " Removes top toolbar | |
set guioptions-=r " Removes right hand scroll bar | |
set go-=L " Removes left hand scroll bar | |
set linespace=15 |
Try running sudo apt-get update separately on a command line. Your Ubuntu might be old and its repositories could be out of date. So apt-get update itself is maybe not working in your machine. | |
To step over that issue, run the following commands: | |
# Disable RVM from trying to install necessary software via apt-get | |
rvm autolibs disable | |
# Then try installing Ruby: | |
rvm install 1.8.7 |
You can use: Request::url() to obtain the current URL, here is an example: | |
@if(Request::url() === 'your url here') | |
// code | |
@endif | |
Laravel offers a method to find out, whether the URL matches a pattern or not | |
if (Request::is('admin/*')) | |
{ | |
// code |