Skip to content

Instantly share code, notes, and snippets.

@rollxx
rollxx / gist:1632066
Created January 18, 2012 08:58
twitter link for fs
<a href="https://twitter.com/share" class="twitter-share-button" data-url="cms-ref" data-text="title info">Tweet</a>
@rollxx
rollxx / mediathek-video.js
Created January 18, 2012 09:54
reparse facebook button on ajax call
if (typeof FB !== 'undefined') {FB.XFBML.parse(document.getElementById('socialButtons'));}
@rollxx
rollxx / gist:1663417
Created January 23, 2012 14:34
print template parent name
$CMS_VALUE(#global.node.parent.name.toString,default:"nothing here")$
@rollxx
rollxx / gist:1876502
Created February 21, 2012 13:13
reload tomcat cache
wget -q http://localhost:8080/admin_intern/reloadcache -O /dev/null
@rollxx
rollxx / gist:1884069
Created February 22, 2012 10:29
git cherry pick
$ git checkout target-branch
$ git cherry-pick 011210939923d812421d037fbb89168495e9b254
if something goes wrong -- revert changes:
$ git reset --merge
011210939923d812421d037fbb89168495e9b254 = commit from other branch
@rollxx
rollxx / gist:1884075
Created February 22, 2012 10:31
git remove a local commit

$ git rebase -i HEAD~5

  • Don't use git-rebase on public (remote) commits.
  • Make sure your working directory is clean (commit or stash your current changes).
  • Run the above command. It launches your $EDITOR.
  • Replace pick before C and D by squash. It will meld C and D into B. If you want to delete a commit then just delete its line.

If you are lost, type:

$ git rebase --abort

@rollxx
rollxx / gist:2204041
Created March 26, 2012 09:01
web.xml jsf development stage
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
@rollxx
rollxx / gist:2689219
Created May 13, 2012 16:40
iStat trial reset
rm ~/Library/Preferences/com.bjango.istatmenus.plist
@rollxx
rollxx / gist:3742132
Created September 18, 2012 08:58
git reset to hash
# reset the index to the desired tree
git reset 56e05fced
# move the branch pointer back to the previous HEAD
git reset --soft HEAD@{1}
git commit -m "Revert to 56e05fced"
# Update working copy to reflect the new commit
git reset --hard
@rollxx
rollxx / gist:4130325
Created November 22, 2012 10:00
remove duplicates from finder open with menu
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain user