segunda-feira, 6 de maio de 2019

How to fix screen tearing in Linux MX

First, verify your driver configuration, after create the proper conf file.


lspci -nnk | grep -i -EA3 "3d|display|vga"

ls -l /etc/X11

mkdir ~/xorg-backup
sudo mv -v /etc/X11/xorg.conf ~/xorg-backup/
sudo mv -v /etc/X11/xorg.conf.d ~/xorg-backup/

sudo nano /etc/X11/xorg.conf

Section "Device"
Identifier "Radeon"
Driver "radeon"
Option "TearFree" "on"
EndSection


sudo mkdir /etc/X11/xorg.conf.d
sudo nano /etc/X11/xorg.conf.d/20-amdgpu.conf

Section "Device"
Identifier "AMD"
Driver "amdgpu"
Option "TearFree" "true"
EndSection

terça-feira, 26 de março de 2019

How to set pip install behind proxy

Under windows:

Set environment variables:

http_proxy=http://DOMAIN\user:pass@proxy:port
https_proxy=https://DOMAIN\user:pass@proxy:port

Then:

 pip --trusted-host pypi.org install package

or

pip --trusted-host=pypi.python.org --trusted-host=pypi.org --trusted-host=files.pythonhosted.org install packagename

or

Create a file named pip.ini in: c:\programdata\pip. Its necessary create the folder.

Put inside:
[global]
trusted-host = pypi.python.org
   pypi.org
   files.pythonhosted.org

Set only this:
https_proxy=https://DOMAIN\user:pass@proxy:port

Now you can pip install.

segunda-feira, 25 de março de 2019

How to share folder Windows 7 anonymously

desativar o firewall do windows

diretiva do computador local
configuração do computador
configurações do windows
configurações de segurança
  diretivas locais
opções de segurança
Acesso à rede: compartilhamentos acessíveis anonimamente
colocar aqui o nome do compartilhamento que foi criado
Acesso à rede: deixar que as permissões de todos os usuários sejam aplicadas a usuários anônimos
Habilitada
Acesso à rede: acesso anônimo restritor a pipes nomeados e compartilhamentos
Desabilitada
Contas: status de conta de convidado
Habilitada

Change following:
Accounts: Guest account status – change to Enabled
Network access: Let Everyone permissions apply to anonymous users – change to Enabled
Network access: Restrict anonymous access to Named Pipes and Shares – change to Disabled
Network access: Shares that can be accessed anonymously – enter name of share you created in the text field

sexta-feira, 1 de março de 2019

How to set samba file share server without password - turnkey linux

novo funciona:
[global]
   guest account = nobody
   passdb backend = tdbsam
   os level = 20
   security = user
   workgroup = WORKGROUP
   map to guest = bad user
   server string = file server
   wins server = DC1
   netbios name = servername

[home]
   available = yes
   browsable = yes
   comment = home
   guest ok = yes
   path = /home
   public = yes
   read only = no
   writable = yes
   force user = mip

[ssd]
   available = yes
   browsable = yes
   comment = ssd
   guest ok = yes
   path = /media/mip/ssd
   public = yes
   read only = no
   writable = yes
   force user = mip   

; sudo service smbd restart 

[global]

guest account = nobody
passdb backend = tdbsam
os level = 20
security = user
workgroup = DOMAIN
map to guest = bad user
server string = file server
wins server = DC1
netbios name = servername
[myshare]
available = yes
browsable = yes
comment = servername
guest ok = yes
path = /home
public = yes
read only = no
writable = yes

sudo service smbd restart
sudo ufw allow samba
Novo que funciona:
[global]
   workgroup = WORKGROUP
   server string = %h server (Samba, Ubuntu)
   map to guest = Bad User
   obey pam restrictions = Yes
   pam password change = Yes
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
   unix password sync = Yes
   syslog = 0
   log file = /var/log/samba/log.%m
   max log size = 1000
   socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
   dns proxy = No
   wins support = Yes
   usershare allow guests = Yes
   panic action = /usr/share/samba/panic-action %d
   idmap config * : backend = tdb
   
[ebooks]
   comment = servername
   guest ok = yes
   path = /media/mip/ssd/Documents/ebooks
   browsable = yes
   writable = yes
   read only = no
   force user = mip
   public = yes






sábado, 23 de fevereiro de 2019

How to install Brave Browser on Linux Mint 19

curl -s https://brave-browser-apt-dev.s3.brave.com/brave-core-nightly.asc | sudo apt-key add -

UBUNTU_CODENAME=$( (grep DISTRIB_CODENAME /etc/upstream-release/lsb-release || grep DISTRIB_CODENAME /etc/lsb-release) 2>/dev/null | cut -d'=' -f2 )

echo "deb [arch=amd64] https://brave-browser-apt-dev.s3.brave.com/ $UBUNTU_CODENAME main" | sudo tee /etc/apt/sources.list.d/brave-browser-dev-$UBUNTU_CODENAME.list

sudo apt update

sudo apt install brave-browser

sexta-feira, 22 de fevereiro de 2019

How to install Grub Customizer on Ubuntu or Linux Mint

sudo add-apt-repository ppa:danielrichter2007/grub-customizer -y


# getting new info of this new repo
sudo apt-get -y update

# installing
sudo apt-get install -y grub-customizer
# repo for grub-customizer

How to add proxy settings to Linux Mint 19.1

At search bar type:
proxy

Click on network then put your network settings:



quinta-feira, 21 de fevereiro de 2019

How to create a collection based on query based on a Configuration Baseline

Just create a normal collection and do not put any workstations inside.
After, select query and point to your configuration baseline, like this:


SELECT SMS_R_SYSTEM.ResourceID, 
       SMS_R_SYSTEM.ResourceType, 
       SMS_R_SYSTEM.NAME, 
       SMS_R_SYSTEM.SMSUniqueIdentifier, 
       SMS_R_SYSTEM.ResourceDomainORWorkgroup, 
       SMS_R_SYSTEM.Client 
FROM   SMS_R_System 
       INNER JOIN SMS_G_System_DCMDeploymentState 
               ON SMS_G_System_DCMDeploymentState.ResourceID = 
                  SMS_R_System.ResourceId 
WHERE  BaselineID = 
'ScopeId_F1C1683F-1FCE-49E8-8157-2FE966FFC39A/Baseline_64d60164-a57d-4d56-8e7c-2a4748cf7eb2' 
AND CollectionID = 'S0X00XXA' 
AND ComplianceState = 1 

The readable name of the compliance state. Possible values are:

0 Compliance State Unknown
1 Compliant
2 Non-Compliant
4 Error

quarta-feira, 20 de fevereiro de 2019

How to use Hyper-V and Virtualbox simultaneously on the same computer

Its easy:

Open command prompt as administrator and type:

bcdedit /copy {current} /d "Windows 10 (com Hyper-V)"

This will make you create new entry in bcd database, identical to current one.
Next type this:

bcdedit /set {current} hypervisorlaunchtype off

This will make you set the current entry to disable hyper v.
Now you have a menu that will prompt when you login.

At last, but not least:

bcdedit /timeout 3

This is the time menu will be showing.

Thats it!



How to use Powershell script inside SCCM program.

Just use this syntax:

powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -WindowStyle Hidden -File \\local\folder1\folder2\folder3\scripts\Start-PowershellScript.ps1

First create a program with program wizard without this ugly command line, just select script name normally. After the program has been created, in properties panel put the command line.


Decorator Powershell Design Patterns

 Powershell Design Patterns Decorator ```powershell # Classe base 'Beverage' class Beverage {     [string]$description = "Unkno...