Skip to content

Instantly share code, notes, and snippets.

View sdoro's full-sized avatar

Sandro Doro sdoro

View GitHub Profile
@sdoro
sdoro / gist:5715718
Last active December 18, 2015 03:08
How to change bluetooth device name (in Ubuntu) ?
you have to create a file called /etc/machine-info which should have the following content:
PRETTY_HOSTNAME=the device name you want
@sdoro
sdoro / resetAdminPasswd.py
Created May 7, 2013 14:50
Howto Reset The Admin Password in Django
from django.contrib.auth.models import User
users = User.objects.all()
u = users[0]
u.set_password('sergio')
u.save()
@sdoro
sdoro / add.sh
Created April 6, 2013 21:46
Howto add/remove in VirtualBox a fifth NIC (without GUI) in hostonly networking
VBoxManage modifyvm "vm" --hostonlyadapter5 vboxnetX
VBoxManage modifyvm "vm" --nic5 hostonly
@sdoro
sdoro / show-meta.sh
Created April 3, 2013 09:45
To view ocf:heartbeat:RESOURCE meta-data
crm ra meta ocf:heartbeat:RESOURCE
@sdoro
sdoro / gist:5287784
Created April 1, 2013 21:10
Install puppet from 'Puppet Labs' repository (debian lenny)
apt-get -t lenny-backports install -y puppet
wget http://apt.puppetlabs.com/puppetlabs-release-squeeze.deb
dpkg -i puppetlabs-release-squeeze.deb
apt-get update
apt-get -t puppetlabs install -y puppet
apt-get -y autoremove
@sdoro
sdoro / mount.sh
Created February 18, 2013 07:57
Mounting qcow2 VM disk images
modprobe nbd max_part=63
qemu-nbd -c /dev/nbd0 /var/lib/libvirt/images/vm.qcow2
mkdir /tmp/x && mount /dev/nbd0p1 /tmp/x
wget http://apt.puppetlabs.com/puppetlabs-release-precise.deb
dpkg -i puppetlabs-release-precise.deb
apt-get update
apt-get install puppet puppetmaster
@sdoro
sdoro / term-log.sh
Last active January 22, 2023 17:59
How do I find out upgrade history of Debian/Ubuntu ?
# use the log Luke!
less /var/log/apt/term.log
# 2014-09-24
# also in:
less /var/log/apt/history.log
less /var/log/dpkg.log
@sdoro
sdoro / gist:4564219
Last active December 11, 2015 07:08
Logging Android messages with tag <activity1> (with priority d), with tag <activity2> (with priority d), with tag <activity3> (with priority d) and sets the priority level for all tags to "silent"
# for details: http://developer.android.com/tools/debugging/debugging-log.html
adb logcat <activity1>:D <activity2>:D <activity3>:D *:S
@sdoro
sdoro / ns4TLD.md
Last active December 11, 2015 04:28
Check root servers for the .org tld domains:

Check root server for .org TLD domains:

$ dig ns org +short
b0.org.afilias-nst.org.
a0.org.afilias-nst.info.
a2.org.afilias-nst.info.
c0.org.afilias-nst.info.
d0.org.afilias-nst.org.
b2.org.afilias-nst.org.