This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| wget https://dl.dropboxusercontent.com/u/85403877/ubu13-chrome-fix/lib32gcc1_4.7.3-1ubuntu1_all.deb | |
| wget https://dl.dropboxusercontent.com/u/85403877/ubu13-chrome-fix/lib32stdc%2B%2B6_4.7.3-1ubuntu1_all.deb | |
| wget https://dl.dropboxusercontent.com/u/85403877/ubu13-chrome-fix/libc6-i386_2.17-0ubuntu5_all.deb | |
| sudo dpkg -i lib32gcc1_4.7.3-1ubuntu1_all.deb lib32stdc++6_4.7.3-1ubuntu1_all.deb libc6-i386_2.17-0ubuntu5_all.deb | |
| sudo dpkg -i google-chrome-stable_current_i386.deb | |
| sudo apt-get -f install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function SelectText(element) { | |
| var doc = document | |
| , text = doc.getElementById(element) | |
| , range, selection | |
| ; | |
| if (doc.body.createTextRange) { | |
| range = document.body.createTextRange(); | |
| range.moveToElementText(text); | |
| range.select(); | |
| } else if (window.getSelection) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| http://cheats.jesse-obrien.ca/ | |
| https://gist.github.com/anchetaWern/4223764 | |
| https://medium.com/on-coding/e8d93c9ce0e2 | |
| http://laravelbook.com/laravel-user-authentication/ | |
| https://github.com/formativ/tutorial-laravel-4-authentication |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git reset --soft HEAD~1 //delete previous commit | |
| HEAD~1 is a shorthand for the commit before head. Alternatively you can refer to the SHA-1 of the hash you want to reset to. --soft option will delete the commit but it will leave all your changed files "Changes to be committed", as git status would put it. | |
| If you want to get rid of any changes to tracked files in the working tree since the commit before head use --hard instead. | |
| Now if you already pushed and someone pulled which is usually my case, you can't use git reset. You can however do a git revert, | |
| git revert HEAD | |
| This will create a new commit that reverses everything introduced by the accidental commit. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var a = map.getDiv(), | |
| b = a.offsetLeft, | |
| c = a.offsetTop, | |
| e = a.offsetWidth, | |
| h = a.offsetHeight; | |
| var f = drag_area.offsetLeft, | |
| i = drag_area.offsetTop, | |
| g = obj.offsetWidth, | |
| p = obj.offsetHeight; | |
| var j = obj.offsetLeft + f + g / 2; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function css(a){ | |
| var o = {}; | |
| var rules = window.getMatchedCSSRules(a.get(0)); | |
| for(var r in rules) { | |
| o = $.extend(o, css2json(rules[r].style), css2json(a.attr('style'))); | |
| } | |
| return o; | |
| } | |
| function css2json(css){ | |
| var s = {}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| if ( ! function_exists('camelCase')) | |
| { | |
| function camelCase($subject, $delimiters=' _-', $lcfirst=true) | |
| { | |
| if ( ! is_string($subject)) | |
| { | |
| throw new Exception("Subject must be of type string"); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //run command | |
| sudo a2enmod userdir | |
| //open file | |
| sudo nano /etc/apache2/mods-available/php5.conf | |
| //change | |
| <IfModule mod_userdir.c> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Open sahi/htdocs/spr/concat.js | |
| //and look for: | |
| Sahi.prototype._isFF2 = function () {return /Firefox\/2|Iceweasel\/2|Shiretoko\/2/.test(this.navigator.userAgent);}; | |
| Sahi.prototype._isFF3 = function () {return /Firefox\/3|Iceweasel\/3|Shiretoko\/3/.test(this.navigator.userAgent);}; | |
| Sahi.prototype._isFF4 = function () {return /Firefox\/4|Iceweasel\/4|Shiretoko\/4/.test(this.navigator.userAgent);}; | |
| Sahi.prototype._isFF5 = function () {return /Firefox\/5|Iceweasel\/5|Shiretoko\/5/.test(this.navigator.userAgent);}; | |
| //and replace it with |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git diff-tree -r --no-commit-id --name-only --diff-filter=ACMRT HEAD~1 HEAD | xargs tar -rf ~/exports/export.tar |