Get in the rails console
sudo gitlab-rails console -e production
then:
user = User.find_by_username('root')
user.password = 'new_password_here'
user.password_confirmation = 'new_password_here'
Get in the rails console
sudo gitlab-rails console -e production
then:
user = User.find_by_username('root')
user.password = 'new_password_here'
user.password_confirmation = 'new_password_here'
| apt | pacman | what it does |
|---|---|---|
apt update |
pacman -Sy |
sync package database |
apt upgrade |
pacman -Su |
upgrade installed packages |
apt update && apt upgrade |
pacman -Syu |
sync + upgrade (use this one) |
apt install pkg |
pacman -S pkg |
install package |
apt remove pkg |
pacman -R pkg |
remove package |
apt purge pkg |
pacman -Rns pkg |
remove pkg + deps + configs |
| #!/usr/bin/env bash | |
| # | |
| # Shell script to automate the backup of Microsoft SQL Server vNEXT backups on Linux. | |
| # Written by Bobby Allen <[email protected]>, 26/04/2017 | |
| # | |
| # Download this script and put into your servers' /usr/bin directory (or symlink) then make it executable (chmod +x) | |
| # | |
| # Usage example (backup databases into /var/backups, keep backups for 5 days, connect to server "localhost" with the account "sa" and a password of "P455w0RD"): | |
| # mssqlbackup "/var/dbbackups" 5 "localhost" "sa" "P455w0rD" |
| -- Query the database to calculate a recommended innodb_buffer_pool_size | |
| -- and get the currently configured value | |
| -- The rollup as the bottom row gives the total for all DBs on the server, where each other row is recommendations per DB. | |
| SELECT | |
| TABLE_SCHEMA, | |
| CONCAT(CEILING(RIBPS/POWER(1024,pw)),SUBSTR(' KMGT',pw+1,1)) | |
| Recommended_InnoDB_Buffer_Pool_Size, | |
| ( | |
| SELECT CONCAT(CEILING(variable_value/POWER(1024,FLOOR(LOG(variable_value)/LOG(1024)))),SUBSTR(' KMGT',FLOOR(LOG(variable_value)/LOG(1024))+1,1)) |
| from __future__ import print_function | |
| import time | |
| def query_10k(cur): | |
| t = time.time() | |
| for _ in range(10000): | |
| cur.execute("SELECT 1,2,3,4,5") | |
| res = cur.fetchall() | |
| assert len(res) == 1 | |
| assert res[0] == (1,2,3,4,5) |
| { | |
| "log": { | |
| "logelevel": "info" | |
| }, | |
| // Run a local SOCKS proxy for apps to connect to. | |
| "inbounds": [{ | |
| "port": 1080, | |
| "listen": "127.0.0.1", | |
| "protocol": "socks", | |
| "sniffing": { |
| from time import sleep | |
| import requests | |
| import json | |
| def vote(): | |
| req = requests.post('https://www.menti.com/core/identifiers', | |
| headers={'authority': 'www.menti.com', | |
| 'content-length': '0', |