`
文章列表

datamapper tips

    博客分类:
  • db
   "#{adapter_name}://#{username}:#{password}@#{host}/#{storage_name}" 

sqlite3 tips

    博客分类:
  • db
.help .databases .show

scala tips

java -verion java -jar scala-2.8.0.final-installer.jar The name Scala is a contraction of the words scalable language. sudo ln -s  /home/wenbo/scala/bin/scala  /usr/bin/scala scala -version Note that Scala uses square brackets ([...]) for parameterized types, whereas Java uses angle brackets (<... ...
a = $LOAD_PATH require 'bundler/setup' #will change the value of $LOAD_PATH b = $LOAD_PATH a == b #fuck! require  "xsd/qname" 后$LOAD_PATH里会多一个 "/home/wenbo/.rvm/gems/ruby-1.9.2-p180/gems/soap4r-ruby1.9-2.0.0/lib"

ruby tips

$LOAD_PATH autoload __LINE__ 行号

mysql tips

    博客分类:
  • db
status;

command tips

:~$ dpkg -L chromium-browser sudo find  / -name grub.cfg sudo dmidecode >info.txt;less info.txt lspci |grep VGA sudo vim /etc/sudoers groups [OPTION]... [USERNAME]... sudo usermod -a -G vboxusers wenbo chkconfig update-rc.d sudo wget -r -p -np -k http://progit.org/ axel  -n 10  -vo .  http://xxx/ ...

memcache

sudo apt-get install memcached /usr/bin/memcached -m 64 -p 11211 -u memcache -l 127.0.0.1   Thread.current[:memcache_client] = self.object_id if !@multithread

postgresql

    博客分类:
  • db
sudo -u postgres createdb mydb

Git Tips

    博客分类:
  • git
git remote show origin git config -l git blame models/user.rb git branch -a #List both remote-tracking branches and local branches. git var -l git diff --cached #git diff --cached to see what you’ve staged so far git-clean - Remove untracked files from the working tree This is particularly useful i ...

Git Rebase

    博客分类:
  • git
Do not rebase commits that you have pushed to a public repository. $ git checkout experiment $ git rebase master First, rewinding head to replay your work on top of it... Applying: added staged command Rebasing the change introduced in C3 onto C4. It works by going to the common ancestor of the t ...
sudo apt-get  install libqt4-opengl dkpg -i then run "virtualbox"
let’s assume that you have a directory containing three files, and you stage them all and commit. Staging the files checksums each one (the SHA-1 hash we mentioned in Chapter 1), stores that version of the file in the Git repository (Git refers to them as blobs), and adds that checksum to the staging ...
Because a branch in Git is in actuality a simple file that contains the 40 character SHA-1 checksum of the commit it points to, branches are cheap to create and destroy. Creating a new branch is as quick and simple as writing 41 bytes to a file (40 characters and a newline). To see the last commit o ...
Everything in Git is check-summed before it is stored and is then referred to by that checksum. The mechanism that Git uses for this checksumming is called a SHA-1 hash. This is a 40-character string composed of hexadecimal characters (0–9 and a–f) and calculated based on the contents of a file or d ...
Global site tag (gtag.js) - Google Analytics