Skip to content

Instantly share code, notes, and snippets.

@miguelwicht
miguelwicht / Terminal commands
Last active November 25, 2016 02:23
Fix JiraLockedError
###remove lock file
```
rm -rf /var/atlassian/application-data/jira.jira-home.lock
```
###stop jira and confluence
```
/opt/atlassian/confluence/bin/stop-confluence.sh
/opt/atlassian/jira/bin/shutdown.sh
```
@miguelwicht
miguelwicht / js-function-with-optional-arguments
Created September 13, 2012 13:49
JavaScript function with optional arguments and default values
/*
* Exmaple for how to use a JavaScript function with optional arguments
* (1) define default values in object as key-value pairs
* (2) compare default_options with options and add default value if a
* key is not present in options
* (3) do what you want to do with your function
*/
function doSomething(options) {
var default_options = {
'option1' : true,
@miguelwicht
miguelwicht / toggleButton.js
Created September 3, 2012 19:08
Simple script that toggles a button on click and removes active classes on all other buttons, so that there is just one active button at all times
$('.button').click(function(){
$('.button').removeClass('active');
$(this).addClass('active');
});