Tuesday, February 23, 2016

Mikrotik UNIFI initial setup guide



Interfaces

Name: ether1-gateway
MTU: 1500
L2 MTU: 1598
ARP: Enabled
VLAN
VLAN ID: 500
Name: vlan500
MTU: mtu1500
VLAN
VLAN ID: 600
Name: vlan600
MTU: mtu1500


PPP

Name: unifi
Type: PPPoE Client
Max MTU: 1492
Max MRU: 1492
Interfaces: vlan500
User: yourusername@unifi
Password: yourunifipassword


Bridge

Name: bridge-iptv
Type: Bridge
MTU: 1500
Name: bridge-local
Type: Bridge
MTU: 1500

Monday, February 22, 2016

Execute sudo command without authenticating via password

The approach to solve your problem is to put your user in sudoers file, like you can see.
Open terminal window and type:
sudo visudo
In the bottom of the file, type the follow:
username ALL=(ALL) NOPASSWD: ALL
Where username is your username in your system. Save and close sudoers file (if you haven't changed your default terminal editor (you'll know if you have), press ctl+x to exit nano (but note that the screenshot below shows vim), and it'll prompt you to save).
sudoers file]
After this, you can, in terminal window, type sudo <Whatever you want>, without being prompted for the password.
This only applies, to sudo command in terminal window. For example, when you try to install a package in software center, you will be prompted to insert your password, like you can see in the next Screenshot.

Sources: http://askubuntu.com/questions/147241/execute-sudo-without-password

Friday, February 19, 2016

My favorite Telegram Bots

My objective is to create my own bot @EscrowBot. Found plenty of Telegram Bots out there, trust me! But, I prefer to list down my all time favorite bots here for future development and providing you an easy guide to set up - forget it. Plug and play, everything handled by API. All these bots are written in Phyton, Java, C#, Ruby, Go, Lua and Haskell. I have only experienced Phyton and Lua myself

https://github.com/yagop/telegram-bot (written in LUA)
https://github.com/jh0ker/welcomebot (written in PYTHON)
https://github.com/yukuku/telebot  (written in PYTHON)

Bots Library of Python
https://github.com/python-telegram-bot

@BotFather is compulsory to hook them up with API


Yagop and Yukuku, both already have a well written guide. So, I will not emphasize anymore as it is straight out of box. But, I would like to thank Jannes Hoke, @jh0ker creator of welcomebot who gave me on site support over my deployment. I really appreciate that 5 hours sessions because I couldn't find any guide out there to help me out. Hence, I decided to write a guide to help the community before I have memory loss.

Note that Python has many libraries. Ensure that you feed the bots with the correct Python library and host them correctly. For telebot and welcomebot, you may simply host it at Ubuntu 14.04 desktop whereas telegram-bot, you may host it at Google Appspot Cloud Console. Environment is different, even though I try to host welcomebot there, it throws out a bunch of errors. So, don't use it! Lead developer agreed with me.

Now, you got to look at the PYTHON itself, welcomebot uses python3. In fact, both version of python2 and python3 can coexist in Ubuntu 14.04, just make sure you load the library in the correct environment so that the examples of clibot.py, echobot2.py located in python-telegram-bot-master may test run flawlessly before you put actual test on welcomebot.

Some terminal commands you may need below
Brought to you by www.airkayu.com

sudo apt-get install python-pip
sudo python clibot.py
sudo python echobot2.py
pip3 install python-telegram-bot
sudo apt-get install python3-pip
python3 --version
Optional: sudo pip3 install -r requirements.txt
python3 -V
Optional: sudo pip3 install -r requirements-dev.txt
Optional: sudo make test
sudo python3 bot.py 

Don't forget reboot!

Tuesday, February 16, 2016

How to create startup terminal auto-launch for Ubuntu

Alright, you will need make a startup, add program and insert the command below:-
sh -c "sh /home/administrator/Documents/masternode.sh"

Next, you will need a sample script "masternode.sh" and have the following shell script below and Hurray! There, you are good to go. Cheers!
#!bin/sh

sleep 15
gnome-terminal --geometry=75x45 --title=Masternode --execute bash -c "sleep 5; cd ~; sudo ./dashd; sleep 60; sudo ./dashd getinfo ;bash"

#gnome-terminal -e "cd ~ && sudo ./dashd"
 
Brought to you by www.airkayu.com

Saturday, February 13, 2016

Telegram Bots


  • https://github.com/yukuku/telebot/blob/master/main.py (important)
  • https://github.com/jh0ker/welcomebot/blob/master/bot.py (important)
  • https://github.com/yagop/telegram-bot (important)
  • https://www.reddit.com/r/TelegramBots/?count=125&after=t3_3qdtbc (source)