This file contains 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
# Log in as root | |
# create user jira | |
useradd jira:jira (leta reda på bra exempel) | |
passwd jira | |
run visudo | |
# ADD at the end of the file: | |
"jira ALL=(ALL) ALL" |
This file contains 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
<Loftux> I have this in my .bash_aliases file | |
ff(){ | |
find $1 -name "*.$2" -not -name "*min.js"|xargs grep -i $3 | |
} | |
[16:08] <Loftux> ff <startdir> <type of file> <search term> | |
[16:08] <Loftux> The I can search alfresco source very convenient,like if I want to find something how its done by alfresco: | |
[16:08] <Loftux> ff tomcat/webapps/share/ js doBeforeDialogShow |
This file contains 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
#!/bin/sh | |
# | |
# chkconfig: 2345 80 30 | |
# description: Alfresco Enterprise | |
# | |
RETVAL=0 | |
start () { | |
su -m ec2-user -c "cd /opt/alfresco && /opt/alfresco/alfresco.sh start" "$2" |
This file contains 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
Also, please write good git commit messages. A good commit message | |
looks like this: | |
Header line: explaining the commit in one line | |
Body of commit message is a few lines of text, explaining things | |
in more detail, possibly giving some background about the issue | |
being fixed, etc etc. | |
The body of the commit message can be several paragraphs, and |
This file contains 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
#showing git branches in bash prompt | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
function proml { | |
local RED="\[\033[0;31m\]" | |
local LIGHT_RED="\[\033[1;31m\]" | |
local YELLOW="\[\033[0;33m\]" | |
local LIGHT_GREEN="\[\033[1;32m\]" |
This file contains 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
@ECHO OFF | |
REM Alfresco backup script | |
REM Version 1.01, Updated: 2011-11-17 | |
REM By Erik Billerby, billerby[-at-]gmail.com | |
REM Performs a full offline backup of Alfresco. | |
REM Location where 7-Zip is installed on your computer. | |
REM The default is in a folder, '7-Zip' in your Program Files directory. |
This file contains 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
define('WP_HOME','http://ny.url/wordpress'); | |
define('WP_SITEURL','http://ny.url/wordpress'); |
This file contains 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
a:1:{i:0;s:31:"http://gammal.url.com/wordpress";} |
This file contains 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
UPDATE wp_posts SET guid = REPLACE ( guid, 'http://old.domain.com', 'http://new.domain.com'); | |
UPDATE wp_posts SET post_content= REPLACE ( post_content, 'http://old.domain.com', 'http://new.domain.com'); | |
UPDATE wp_options SET option_value = REPLACE(option_value, 'http://old.domain.com', 'http://new.domain.com') WHERE LEFT(option_value, 2) <> 'a:'; |
This file contains 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
// The userid:s comes as one string separated by pipes (|), tokenize it. | |
$users = $_POST["markedUsers"]; | |
$tok = strtok($users, "|"); | |
while ($tok !== false) { | |
// Get the user and generate a new password. | |
require_once( ABSPATH . 'wp-includes/class-phpass.php'); | |
$password = wp_generate_password(12, false); | |
$wp_hasher = new PasswordHash(8, TRUE); | |
$cryptedpassword = $wp_hasher->HashPassword($password); | |
NewerOlder