##Clamav basic usage
- Update db:
$ sudo freshclam
- Basic scan:
$ clamscan OPTIONS File/Folder
##Clamav basic usage
$ sudo freshclam
$ clamscan OPTIONS File/Folder
#Creating big list | |
l = [] | |
for i in range(255): | |
l.append(i) | |
#Print list in three columns | |
count = 1 | |
for a in l: | |
if count % 3 == 0: | |
print(a) |
<?xml version="1.0"?> | |
<openbox_config xmlns="http://openbox.org/3.4/rc" xmlns:xi="http://www.w3.org/2001/XInclude"> | |
<resistance> | |
<strength>10</strength> | |
<screen_edge_strength>30</screen_edge_strength> | |
</resistance> | |
<focus> | |
<focusNew>yes</focusNew> | |
<!-- always try to focus new windows when they appear. other rules do | |
apply --> |
dpkg-query -W -f='${binary:Package}\n' | grep -E -e '^(ia32-)?(sun|oracle)-java' -e '^openjdk-' -e '^icedtea' -e '^(default|gcj)-j(re|dk)' -e '^gcj-(.*)-j(re|dk)' -e '^java-common' | xargs sudo apt-get -y remove | |
sudo apt-get -y autoremove | |
dpkg -l | grep ^rc | awk '{print($2)}' | xargs sudo apt-get -y purge | |
sudo bash -c 'ls -d /home/*/.java' | xargs sudo rm -rf | |
sudo rm -rf /usr/lib/jvm/* | |
for g in ControlPanel java java_vm javaws jcontrol jexec keytool mozilla-javaplugin.so orbd pack200 policytool rmid rmiregistry servertool tnameserv unpack200 appletviewer apt extcheck HtmlConverter idlj jar jarsigner javac javadoc javah javap jconsole jdb jhat jinfo jmap jps jrunscript jsadebugd jstack jstat jstatd native2ascii rmic schemagen serialver wsgen wsimport xjc xulrunner-1.9-javaplugin.so; do sudo update-alternatives --remove-all $g; done | |
sudo updatedb | |
sudo locate -b '\pack200' | |
#http://askubuntu.com/questions/84483/how-to-completely-uninstall-java |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
from sqlalchemy.dialects import mysql | |
from sqlalchemy import Integer, Column, update, insert, MetaData, Table | |
from sqlalchemy.schema import CreateTable | |
def createtables(): | |
tables = [] | |
tabledict = {} | |
metadata=MetaData() |
import pyodbc | |
db = pyodbc.connect('Driver={Pervasive ODBC Client Interface};ServerName=MyServer;dbq=@DB;') | |
cursor = db.cursor() | |
cursor.execute("SELECT Id FROM TABLE") | |
for row in cursor.fetchall(): | |
print row | |
db.close() |
from ctypes import * | |
# https://msdn.microsoft.com/en-us/library/windows/desktop/ms645505(v=vs.85).aspx | |
###################### | |
# Yes/No msg box | |
##################### | |
a = windll.user32.MessageBoxW(0, "Hello\n", "The Title\n",4) |
Source: https://askubuntu.com/questions/907246/how-to-disable-systemd-resolved-in-ubuntu | |
Disable the systemd-resolved service and stop it: | |
sudo systemctl disable systemd-resolved.service | |
sudo service systemd-resolved stop | |
Put the following line in the [main] section of your /etc/NetworkManager/NetworkManager.conf: | |
dns=default | |
Delete the symlink /etc/resolv.conf |
When I googled how to create my own offline repository of packages for use in an offline Ubuntu/Debian machine, the results where disheartening and the steps to be taken scattered all over the place.
The files within this gist will allow you to:
Packages.gz
file so that you can add the repository folder you create to the target machine's /etc/apt/sources.list
file.