Setup instructions for the Ubuntu 16.04 workstations and servers in the laboratory environment. Replace systemctl with Upstart start|stop for Ubuntu 14.04.
sudo tee /etc/sudoers.d/administrator <<EOF
administrator ALL=(ALL) NOPASSWD: ALL
EOF| #!/usr/bin/perl -w | |
| #Source: https://newspaint.wordpress.com/2014/08/18/filtering-easylist-for-hosts-file-style-adblock/ | |
| use strict; | |
| my %hosts = (); | |
| while ( <> ) { | |
| if ( $_ =~ m/^\|\|([a-z][a-z0-9-_.]+\.([a-z]{2,3}))\^\s*$/ ) { | |
| $hosts{$1} = 1; | |
| } |
| Set WSHShell = WScript.CreateObject("WScript.Shell") | |
| Set WSHShellUserEnvironment = WSHShell.Environment("User") | |
| DomainName = "DOMAIN" | |
| User = "USER" | |
| SET UsrObj = GETOBJECT("WinNT://" & DomainName & "/" & User & ",user") | |
| NT4Name = replace(UsrObj.ADsPath,"WinNT://","") | |
| tempArray = split(nt4Name,"/") | |
| NT4Name = tempArray(1) | |
| QueryFilter = QueryFilter & "(samAccountName=" & NT4Name & ")" | |
| QueryString = "<LDAP://" & DomainName & ">;" & QueryFilter & ";distinguishedName;subtree" |
| #!/bin/bash | |
| # usage sh ansible_template.sh project_name | |
| # Based on http://docs.ansible.com/ansible/latest/playbooks_best_practices.html | |
| # Also, you can use ansible-galaxy: | |
| # ansible-galaxy init project_name | |
| pname=$1 | |
| mkdir -p $pname/{group_vars,host_vars,library,module_utils,filter_plugins,roles} | |
| touch $pname/{production,staging,template.yml,$pname.yml} | |
| mkdir -p $pname/roles/{common,$pname}/{tasks,handlers,templates,files,vars,defaults,meta,library,module_utils,lookup_plugins} | |
| touch $pname/roles/{common,$pname}/{tasks,handlers,vars,defaults,meta}/main.yml |
| #!/bin/bash | |
| if [ $# -eq 0 ]; then | |
| echo "please provide hostname or ip address" | |
| exit 1 | |
| fi | |
| url=$1 | |
| output=$(curl -s -f -k -m 10 --header "Content-Type: application/soap+xml;charset=UTF-8" --header "WSMANIDENTIFY: unauthenticated" http://${url}:5985/wsman --data "<s:Envelope xmlns:s=http://www.w3.org/2003/05/soap-envelope xmlns:wsmid=http://schemas.dmtf.org/wbem/wsman/identity/1/wsmanidentity.xsd><s:Header/><s:Body><wsmid:Identify/></s:Body></s:Envelope>" || true); | |
| if [[ $output == *"IdentifyResponse"* ]] | |
| then |
| # Mediawiki, Bugzilla and mediawiki-bugzilla extension | |
| # test setup | |
| version: '2' | |
| services: | |
| mysql: | |
| container_name: mw-bz-mysql | |
| image: mysql | |
| volumes: | |
| - "./data/mysql:/var/lib/mysql" | |
| restart: always |
| // Policy template for Linux. | |
| // Uncomment the policies you wish to activate and change their values to | |
| // something useful for your case. The provided values are for reference only | |
| // and do not provide meaningful defaults! | |
| // More information in https://www.chromium.org/administrators/policy-list-3 | |
| { | |
| // Cross-origin HTTP Basic Auth prompts | |
| //------------------------------------------------------------------------- | |
| // Controls whether third-party sub-content on a page is allowed to pop-up an | |
| // HTTP Basic Auth dialog box. Typically this is disabled as a phishing |
| # Please make this file available to others | |
| # by sending it to <lirc@bartelmus.de> | |
| # | |
| # this config file was automatically generated | |
| # using lirc-0.8.6-dnk(default) on Tue Jan 16 10:52:43 2018 | |
| # | |
| # contributed by Kirill Trofimov | |
| # | |
| # brand: Rombica | |
| # model no. of remote control: Cinema 4k v01 |
Взято с форума pristavka.de сообщение пользователя ZoYa-MAG-250
Если установить netrc - можно из командной строки управлять воспроизведением MAG 250 (проверялось под Windows):
curl -v -d client-password=PASSWORD -D headers_and_cookies.txt http://192.168.1.111
| #!/usr/bin/env bash | |
| ## Usage: | |
| ## ./migrate.sh $clone_url $project_name $owner_uid | |
| ## Migrate a repository to gogs into the user namespace of the token-user | |
| ## ./migrate.sh git@mygitlab.com:group/repo.git repo 1 | |
| ## uid can be a group uid | |
| ## NB: for local migration, if your gogs instance is inside docker or vm, you must provide path local relative to container's fs | |
| echo $1; |