Delete the last commit, if it hasn't been pushed.
git reset --soft HEAD~1
Delete the last commit, if it has been pushed.
git reset --hard HEAD~1
git push origin HEAD --force
Temporarily ignore local changes to a file
| unbind-key C-b | |
| bind-key C-a send-prefix | |
| # set-window-option mode-mouse on | |
| set-option -g prefix C-q | |
| # set -g status-bg white | |
| # set -g status-fg black | |
| #### COLOUR |
| brew install pcre | |
| wget http://apache.mirrors.pair.com/httpd/httpd-2.4.2.tar.bz2 | |
| tar xzvf httpd-2.4.2.tar.gz | |
| cd httpd-2.4.2 | |
| ./configure | |
| make | |
| make install | |
| sudo cp /usr/local/apache2/bin/ab /usr/sbin/ab |
| function is_blog () { | |
| global $post; | |
| $posttype = get_post_type($post ); | |
| return ( ((is_archive()) || (is_author()) || (is_category()) || (is_home()) || (is_single()) || (is_tag())) && ( $posttype == 'post') ) ? true : false ; | |
| } | |
| Usage: | |
| <?php if (is_blog()) { echo 'You are on a blog page'; } ?> |
| Gemfile | |
| config.ru | |
| Rakefile |
| require 'formula' | |
| class Ab < Formula | |
| homepage 'http://httpd.apache.org/docs/trunk/programs/ab.html' | |
| url 'http://www.apache.org/dist/httpd/httpd-2.4.3.tar.bz2' | |
| sha1 '0ef1281bb758add937efe61c345287be2f27f662' | |
| def patches | |
| end |
| require 'formula' | |
| class Ffmpeg < Formula | |
| homepage 'http://ffmpeg.org/' | |
| url 'http://ffmpeg.org/releases/ffmpeg-1.0.tar.bz2' | |
| sha1 'bf1f917c4fa26cf225616f2063e60c33cac546be' | |
| head 'git://git.videolan.org/ffmpeg.git' | |
| option "without-x264", "Disable H264 encoder" |
Delete the last commit, if it hasn't been pushed.
git reset --soft HEAD~1
Delete the last commit, if it has been pushed.
git reset --hard HEAD~1
git push origin HEAD --force
Temporarily ignore local changes to a file
| # .create() | |
| before_validation | |
| validate | |
| after_validation | |
| before_save | |
| before_create | |
| after_create | |
| after_save | |
| # .save |
| backend default { | |
| .host = "127.0.0.1"; | |
| .port = "8080"; | |
| } | |
| # Drop any cookies sent to Wordpress. | |
| # except when previewing | |
| # also, cache nothing | |
| sub vcl_recv { | |
| if ( !(req.url ~ "(wp-login|wp-admin|preview=true)") ) { |
| img { -webkit-filter: invert(1) !important; } | |
| div.logo { -webkit-filter: invert(1) !important; background-color: white !important;} | |
| * { background-color: black !important; } | |
| *:not(a) { color: white !important; border: none !important; } | |
| a { color: #4dfb45 !important; border: none !important; font-weight: normal !important; } |