Authorguda

Building docker image with host network aka –net=host

There is no option to provide the net as param while building the docker images.
So the container doesn’t have internet from inside.
and is common to get this kind of errors

Running in NNNNNNNNN
Err http://http.debian.net wheezy Release.gpg
  Could not resolve 'http.debian.net'

One (stupid) solution is to put in the Docker file

RUN echo "nameserver 8.8.8.8" > /etc/resolv.conf; cat /etc/resolv.conf

Another is to help Docker with the networking.

Here is a solution is pointed here

# Forward chain between docker0 and eth0
iptables -A FORWARD -i docker0 -o eth0 -j ACCEPT
iptables -A FORWARD -i eth0 -o docker0 -j ACCEPT
# IPv6 chain if needed
ip6tables -A FORWARD -i docker0 -o eth0 -j ACCEPT
ip6tables -A FORWARD -i eth0 -o docker0 -j ACCEPT

And also to configure docker to use a dns server as pointed here

Docker official doc gives instruments to Configure a DNS server for use by Docker

Open the /etc/default/docker file for editing.

$ sudo nano /etc/default/docker

Add a setting for Docker.

DOCKER_OPTS="--dns 8.8.8.8"

Replace 8.8.8.8 with a local DNS server such as 192.168.1.1. You can also specify multiple DNS servers. Separated them with spaces, for example:

–dns 8.8.8.8 –dns 192.168.1.1

Warning: If you’re doing this on a laptop which connects to various networks, make sure to choose a public DNS server.

ps: nm-tool can be used to check local host DNS server

Save and close the file.

Restart the Docker daemon.

$ sudo restart docker

How to ban lol (League of Legends)

If you want your kid to play outside instead in League of Legends this might help you.

You need to find the ip addresses associated with lol. This is done by visiting this url

Then you need to ban all UDP traffic here is how I have done this with iptables.

I understand that there should be much more simpler way.

if true ; then
/sbin/iptables -A INPUT  -p udp  -s 8.23.24.0/23 -j DROP
/sbin/iptables -A INPUT  -p udp  -s 104.160.128.0/19 -j DROP
/sbin/iptables -A INPUT  -p udp  -s 64.124.200.200/29 -j DROP
/sbin/iptables -A INPUT  -p udp  -s 192.207.0.0/24 -j DROP
/sbin/iptables -A INPUT  -p udp  -s 162.249.72.0/21 -j DROP
/sbin/iptables -A INPUT  -p udp  -s 192.64.168.0/21 -j DROP

/sbin/iptables -A OUTPUT  -p udp  -d 8.23.24.0/23 -j DROP
/sbin/iptables -A OUTPUT  -p udp  -d 104.160.128.0/19 -j DROP
/sbin/iptables -A OUTPUT  -p udp  -d 64.124.200.200/29 -j DROP
/sbin/iptables -A OUTPUT  -p udp  -d 192.207.0.0/24 -j DROP
/sbin/iptables -A OUTPUT  -p udp  -d 162.249.72.0/21 -j DROP
/sbin/iptables -A OUTPUT  -p udp  -d 192.64.168.0/21 -j DROP

/sbin/iptables -A FORWARD  -p udp  -s 8.23.24.0/23 -j DROP
/sbin/iptables -A FORWARD  -p udp  -s 104.160.128.0/19 -j DROP
/sbin/iptables -A FORWARD  -p udp  -s 64.124.200.200/29 -j DROP
/sbin/iptables -A FORWARD  -p udp  -s 192.207.0.0/24 -j DROP
/sbin/iptables -A FORWARD  -p udp  -s 162.249.72.0/21 -j DROP
/sbin/iptables -A FORWARD  -p udp  -s 192.64.168.0/21 -j DROP

/sbin/iptables -A FORWARD  -p udp  -d 8.23.24.0/23 -j DROP
/sbin/iptables -A FORWARD  -p udp  -d 104.160.128.0/19 -j DROP
/sbin/iptables -A FORWARD  -p udp  -d 64.124.200.200/29 -j DROP
/sbin/iptables -A FORWARD  -p udp  -d 192.207.0.0/24 -j DROP
/sbin/iptables -A FORWARD  -p udp  -d 162.249.72.0/21 -j DROP
/sbin/iptables -A FORWARD  -p udp  -d 192.64.168.0/21 -j DROP
fi

here is how I block the website of the “great” game.

/sbin/iptables -A INPUT -d 95.172.69.0/24 -j DROP
/sbin/iptables -A INPUT -d 74.201.71.0/24 -j DROP
/sbin/iptables -A INPUT -d 66.151.54.0/24 -j DROP

Create virtual machines from the command line

install the first one with

virt-install --connect qemu:///system --name=lserver1 --os-type=linux --vcpus=3 --memory=746  --disk size=30,sparse=true,cache=unsafe,format=qcow2,bus=virtio,path=/home/guda/images/lserver1.qcow2 --virt-type=qemu --graphics spice --cdrom=/home/guda/Downloads/ubuntu-15.10-server-amd64.iso --os-variant=ubuntuutopic --network=default,model=virtio  --boot cdrom,hd,network,menu=on

Then clone them

  virt-clone --original lserver1 -n lserver3 -f /home/guda/images/lserver3.qcow2 --connect=qemu:///system

Notes:
check some values for the params for virt-install

  • virt-type: virsh capabilities
  • virt-install –os-variant list
  • download image: http://ubuntu.osuosl.org/releases/15.10/ubuntu-15.10-server-i386.iso

If you don’t want to answer questions during the install here is more reading

Preseed

  • https://gist.github.com/smoser/1057704
  • http://blog.dustinkirkland.com/2011/03/ubuntu-server-quick-install-no.html
  • https://help.ubuntu.com/lts/installation-guide/i386/ch04s06.html

Docker stuff

  • https://github.com/dave-tucker/docker-network-demos/blob/master/multihost-local.sh
  • https://docs.docker.com/machine/

MY iPhone is MINE – after jailbreak

Here is the list of the programs that I use

Activator – shortcuts
OpenSSH
iCleaner Pro 7.3.0 beta from  repository http://exile90software.com/cydia/beta
FlipControlCenter – replace the original shortcut icons
IPPeek – via activator
from: https://cydia.angelxwind.net/
AppSync Unified – you need this to install unsinged ipa files.

=====TERMINALS=======

it has nice list of shortcuts, works bad on ios 9.3.3
MobileTerminal (mine bad choice)  from Karens repo https://cydia.angelxwind.net/    which is on the same code base iOS Terminal form BigBoss

MTerminal works good –  from the BigBoss repo.

http://repo.thireus.com – install recommended ios9/ios8/ios7 hacker tools, this includes “newterm” which is updated through ios9. The hacker package installs a bunch of command line utilities like ping, nmap, get, top wget, etc as well. otherwise if you just want terminal just install newterm.

=============================

AudioRecored2 from http://limneos.net/repo or

AppCake – from http://cydia.iphonecake.com/

Bridge – import music to Music from http://canolli.yourepo.com/

Tried but not using
https://appaddict.org/ios-app/ – trying now
https://www.yourepo.com/repo/canolli/pack/bridge – tring now and want to try those also
killbackground8
vShare
iFile – from here http://www.sinfuliphonerepo.com/

Not working
PasswordPilot – inserts your apple password automatically
LocallApStore from http://system.in-appstore.com/repo

Want to try

http://www.xmodgames.com/

Winterboard, Dreamboard

Nice liste of more apps http://www.islamadel.com/en/notes/8-iphone/14-iphone-apps-and-settings

Under linux I use this command to install ipa files.
ideviceinstaller -i /home/guda/Documents/iphone/ipa/openmaps.ipa
This comes from http://www.libimobiledevice.org/

You have to enable to access to your filesystem, maybe apt-get re-install fuse
here here here

Benchmark the usage of partial/helper/render collection

       user     system      total        real
with collection 19.210000   0.030000  19.240000 ( 19.278860)
with partial 55.260000   3.050000  58.310000 ( 58.442582)
with helper 16.640000   0.020000  16.660000 ( 16.663933)

here is the code

- n = 51_000
- some_array = n.times.collect{'hello'}

- Benchmark.bm do |x|
  - x.report("with collection") do
    = render partial: 'name', collection: some_array, locals: {name: 'hello'}

  - x.report("with partial") do
    - n.times.each do
      = render 'name', name: "hello"

  - x.report("with helper") do
    - n.times.each do
      = prunt "hello"

helper:

  def prunt name
    (
      content_tag(:h1, name) +
      link_to('http://www.dir.bg')
    ).html_safe
  end

more https://github.com/gudata/rendering


		
	

Zaffira B headlight bulb change

The cables should point to the engine (at least on the right headlight). Then turn clockwize, until the curved top points the top

Automation

Know who you are going to meet – https://charlieapp.com/dashboard
https://ifttt.com – :)
https://zapier.com/

http://www.boomeranggmail.com/ – nice features to gmail

How slow is to do dynamic extend vs “native”

require 'benchmark'

module Gamer
  def foo
  end
end

class Pesho
  def foo
  end
end

class Gosho

end

class Maria
  include Gamer
end

Rails.logger.level = 1
n = 100000

Benchmark.bm do |x|
  x.report("without extend") do
    n.times do
      Pesho.new.foo
    end
  end

  x.report("with extend") do
    n.times do
      Gosho.new.extend(Gamer).foo
    end 
  end

  x.report("with extend") do
    n.times do
      Maria.new.foo
    end 
  end

end

Increment all serial numbers at once for bind

Increment all serial numbers at once in a named/bind dns zone file.
Just run the script in the current directory /etc/bind/namedb and all serial numbers will be incremented by one.


#!/usr/bin/ruby

Dir.glob("*.db") do |file_name|
  new_zone = []
  File.open(file_name) do |file|
    while (line = file.gets)
        line.chomp!
        if line =~ /Serial/
          line =~ /(\s*?)(\d+)(\s*?)(;.*)/
          serial = $2.to_i
          serial += 1
          puts "#{file_name} serial line:  #{$1} #{$2} #{$3} #{$4} -> #{$1}#{serial}#{$3}#{$4}"
          line = "#{$1}#{serial}#{$3}#{$4}"
        end
        new_zone << line
    end
  end
  new_zone << "\n"

  File.open(file_name, "w") do |new_file|
    new_file.write(new_zone.join("\n"));
  end
end

Jailbreak iphone 4 with ios7

I am the jailbreaking because I feel that my device is my responsibility and I have all rights on it. I don’t wish some company to restrict me what to do or not to do.

My initial setup was iphone 4 with ios 4.1.something.
I used itunes to upgrade to ios 7.1.2
then I used pangu to jailbrake but while installing cydia I lost all icons on my iphone.

Again I used itunes to reinstall ios 7.1.2 but then I use several times the reset/delete/restore options in the iphone settings menu.

Then I followed the steps http://www.lovemediasoft.com/article/bg/jailbreak-ios-7-1-x-pangu-1-1-windows.html and everthing was OK.

When cydia was installed I installed

to access the iphone over usb you need APPLE FILE CONDUIT “2” – is newer than afc2add – I am testing it right now..
AppSync Unified – you need this to install unsinged ipa files.
FlipControlCenter

Simple, right? I took me 2 nights to do all those stupid things in order to have MY phone MINE!

last time it took me again 2 nights those 4 nights are a lot of lost money and I wish apple to pay for them.

Here is the list of the programs that I use
Activator – shortcuts
OpenSSH
PasswordPilot – inserts your apple password automatically
You can download iCleaner Pro 7.3.0 beta by adding developer repository http://exile90software.com/cydia/beta in your Cydia sources. It is available for free

Tried but not using
killbackground8
vShare
AppCake
LocallApStore
iFile

Want to try
http://www.xmodgames.com/
Winterboard, Dreamboard

Nice liste of more apps http://www.islamadel.com/en/notes/8-iphone/14-iphone-apps-and-settings

Under linux I use this command to install ipa files.
ideviceinstaller -i /home/guda/Documents/iphone/ipa/openmaps.ipa
This comes from http://www.libimobiledevice.org/

You have to enable to access to your filesystem, maybe apt-get re-install fuse
here here here

tool to download ipa files

© 2025 Gudasoft

Theme by Anders NorénUp ↑