What do you want to save?
Add Code snippet
New code examples
-
Shell/Bash 2022-03-27 21:20:04
set user as admin gitlab
# Open the rails console, i.e: sudo gitlab-rails console -e production # Excute the follwing: # Find user user = User.find_by(username: 'my_username') # Make the desired change user.admin = true # Save the changes user.save! # Exit the console exit # Lo... Add solution -
-
Javascript 2022-03-27 21:15:02
javascript regex french phone number
function regexPhoneNumber(str) { const regexPhoneNumber = /^((\+)33|0)[1-9](\d{2}){4}$/; if (str.match(regexPhoneNumber)) { return true; } else { return false; } } let phoneNumber = "+33777777777"; console.log(regexPhoneNumber(phone... Add solution -
Shell/Bash 2022-03-27 21:10:09
apache2 mod_jk proxy to tomcat connector
# Add this inside your Apache2 virtualhost # Proxy to Tomcat via AJP Connector <IfModule mod_jk.c> JkMount /* ajp13_worker JkMount / ajp13_worker </IfModule> # Change / to /appname/* to proxy to specified app under tomcat Add solution