$n = sprintf("%04d", $n)var n = ('00'+'09').slice(-2);| sudo scutil --set ComputerName "newname" | |
| sudo scutil --set LocalHostName "newname" | |
| sudo scutil --set HostName "newname" |
| var publications = []; | |
| jQuery(".container .year").each(function(){ | |
| var id = jQuery(this).attr("id"), | |
| year = id.split("-").pop(), | |
| monthName = ""; | |
| jQuery(this).find(".item").each(function(monthNum, monthContainer){ | |
| jQuery(monthContainer).find("a").each(function(index, el){ |
| lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%C(bold blue)<%an>%Creset' --abbrev-commit |
| set global sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'; | |
| set session sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'; |
| SET global log_output = 'FILE'; | |
| SET global general_log_file='/path/to/mysql_general.log'; | |
| SET global general_log = 1; |
| # ERROR: sudo: no tty present and no askpass program specified | |
| sudo visudo | |
| # or edit #includedir /etc/sudoers.d | |
| username ALL = NOPASSWD: /fullpath/to/command, /fullpath/to/othercommand | |
| # All applications: | |
| # username ALL=(ALL) NOPASSWD: ALL |
git reset HEAD~This leaves your working tree (the state of your files on disk) unchanged but undoes the commit and leaves the changes you committed unstaged (so they'll appear as "Changes not staged for commit" in git status, and you'll need to add them again before committing). If you only want to add more changes to the previous commit, or change the commit message1, you could use git reset --soft HEAD~ instead, which is like git reset HEAD~ but leaves your existing changes staged.
| function clearForm(myFormElement) { | |
| var elements = myFormElement.elements; | |
| myFormElement.reset(); | |
| for(i=0; i<elements.length; i++) { | |
| field_type = elements[i].type.toLowerCase(); |
| # Example MySQL config file for large systems. | |
| # | |
| # This is for a large system with memory = 512M where the system runs mainly | |
| # MySQL. | |
| # | |
| # MySQL programs look for option files in a set of | |
| # locations which depend on the deployment platform. | |
| # You can copy this option file to one of those | |
| # locations. For information about these locations, see: | |
| # http://dev.mysql.com/doc/mysql/en/option-files.html |