sudo service systemd-timesyncd stop
sudo service vboxadd-service stop
sudo date +%T -s "00:12:00"
date -s "27 OCT 2016 00:12:00"
date +%Y%m%d -s "20161027"
sudo service systemd-timesyncd stop
sudo service vboxadd-service stop
sudo date +%T -s "00:12:00"
date -s "27 OCT 2016 00:12:00"
date +%Y%m%d -s "20161027"
[Unit]
Description=Selenium hub
[Service]
Environment=DISPLAY=:99
ExecStart=/bin/bash -c 'java -jar /opt/selenium/selenium-server-standalone.jar -role hub'
User=root
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo service selenium_hub status
sudo chkconfig selenium_hub on
sudo systemctl enable selenium_hub.service
mitmproxy -s "modify_response_body.py"
from mitmproxy.models import decoded
def response(context, flow):
if "site.custom.min.js" in flow.request.path:
with decoded(flow.response): # automatically decode gzipped responses.
flow.response.content = flow.response.content.replace(
"surfly.com",
"sitesupport.net")
mitmproxy --ignore ws.sitesupport.net:443
sudo nano ~/.pulse/default.pa
### Generated from: pulseaudio-equalizer
load-module module-ladspa-sink sink_name=ladspa_output.mbeq_1197.mbeq master=alsa_output.pci-0000_05_00.0.analog-stereo plugin=mbeq_1197 label=mbeq #control=-0.2,-0.2,-0.2,-0.2,3.5,3.5,3.5,3.5,3.5,3.5,3.5,2.5,2.5,0.0,0.0
set-default-sink ladspa_output.mbeq_1197.mbeq
set-sink-volume alsa_output.pci-0000_05_00.0.analog-stereo 65536
set-sink-mute alsa_output.pci-0000_05_00.0.analog-stereo 0
### END: Equalized audio configuration
cd /etc/yum.repos.d/
sudo wget http://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo
sudo dnf install binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-PAE-devel dkms
sudo dnf install VirtualBox-5.1
sudo /usr/lib/virtualbox/vboxdrv.sh setup
sudo usermod -a -G vboxusers user_name
# Disable migrations when running tests
MIGRATION_MODULES = {
app[app.rfind('.') + 1:]: 'your_app.migrations_not_used_in_tests'
for app in INSTALLED_APPS
}
TEST_RUNNER = 'your_app.test_runner.CustomDiscoverRunner'
from django.test.runner import DiscoverRunner
from myapp.management.commands._setup_functions import create_groups
class CustomDiscoverRunner(DiscoverRunner):
def setup_databases(self, **kwargs):
result = super(CustomDiscoverRunner, self).setup_databases(**kwargs)
create_groups()
return result
export SSLKEYLOGFILE=/home/jsn/Downloads/sslkeys/sslkeys.log
tar -czvf compressed_file.tar.gz original_file.sql
tar -xzvf compressed_file.tar.gz
watch -n 1 "sudo netstat -anp | grep 3306 | wc -l"
sudo vim /etc/sysctl.d/90-override.conf
fs.inotify.max_user_watches = 524288
psql -U postgres
UPDATE pg_database SET datistemplate = FALSE WHERE datname = 'template1';
DROP DATABASE template1;
CREATE DATABASE template1 WITH TEMPLATE = template0 ENCODING = 'UNICODE';
UPDATE pg_database SET datistemplate = TRUE WHERE datname = 'template1';
\c template1
VACUUM FREEZE;
gem install apiaryio
/home/jsn/.gem/ruby/gems/apiaryio-0.3.3/bin/apiary
/home/jsn/.gem/ruby/gems/apiaryio-0.3.3/bin/apiary preview --output="preview.html"
sudo gedit /etc/yum.repos.d/hipchat4.repoWith the following content:
[atlassian-hipchat4] name=Atlassian Hipchat4 baseurl=https://atlassian.artifactoryonline.com/atlassian/hipchat-yum-client/ enabled=1 gpgcheck=0Install hipchat:
sudo dnf install hipchat4 --refresh----- Atlassian team wasn't able to release rpm package for the latest hipchat for more than 2 months. Fortunately, it is possible to intsall hipchat from the debian package. Download the latest available debian package from here.
sudo dnf install alien
sudo alien HipChat4-4.0.1635-Linux.deb -r
sudo dnf install hipchat4-4.0.1635-2.x86_64.rpm
sudo dnf install xorg-x11-drv-intel-2.99.917-16.20150729.fc23.x86_64
sudo dnf install 'dnf-command(versionlock)'
sudo dnf versionlock add xorg-x11-drv-intel
sudo fdisk -l
sudo umount /dev/sdc
mkdosfs -F 32 -I /dev/sdc
apt-cache madison varnish
sudo apt-get install varnish=4.0.2-1
sudo apt-mark hold varnish
sudo apt-mark unhold varnish
rpm2cpio sqlite-libs-3.11.0-3.fc23.x86_64.rpm | cpio -idmv
sudo cp -R usr/ /
sudo dnf --best --allowerasing install sqlite-libs
import os
from flask import Flask
app = Flask(__name__)
app.logger_name = "flask.app"
# ...
if __name__ == "__main__":
app.run()
app.logger.info("Hello")
[loggers]
keys=root, gunicorn.error, gunicorn.access, requests.packages.urllib3.connectionpool, __main__
[handlers]
keys=log_file, syslog
[formatters]
keys=generic
[logger_root]
level=INFO
handlers=log_file, syslog
[logger___main__]
level=DEBUG
handlers=log_file, syslog
propagate=0
qualname=__main__
[logger_gunicorn.error]
level=INFO
handlers=log_file, syslog
propagate=0
qualname=gunicorn.error
[logger_gunicorn.access]
level=INFO
handlers=log_file, syslog
propagate=0
qualname=gunicorn.access
[logger_requests.packages.urllib3.connectionpool]
level=WARN
handlers=log_file, syslog
propagate=0
qualname=requests.packages.urllib3.connectionpool
[handler_syslog]
class=logging.handlers.SysLogHandler
formatter=generic
args=()
[handler_log_file]
class=logging.FileHandler
formatter=generic
args=('/home/myuser/log/gunicorn.log',)
[formatter_generic]
format=%(asctime)s [%(process)d:%(name)s:%(lineno)s] [%(levelname)s] %(message)s
datefmt=%Y-%m-%d %H:%M:%S
class=logging.Formatter
gunicorn app:app --log-config /home/myuser/gunicorn_logging.conf
Vagrant.configure(2) do |config|
config.vm.box = "box-cutter/debian81"
config.vm.network "private_network", ip: "192.168.33.10"
config.ssh.forward_agent = true
config.vm.provider "virtualbox" do |vb|
vb.memory = "4096"
if ENV.has_key?('VAGRANT_CPUS')
vb.cpus = ENV['VAGRANT_CPUS']
else
vb.cpus = "2"
end
end
end
Ctrl + Shift + Alt + RThe indicator (a red circle) will appear in the panel, informing you that the recording has started. Default video length is limited to 30s, what might be not enough in most cases. To adjust this parameter install dconf Editor and go to the:
org.gnome.settings-daemon.plugins.media-keysAnd look for max-screencast-length to adjust.