Posts

Adopción de ap unifi cuando el comando set-inform no aparece en el ap por ssh - docker controller

Supongamos que queremos migrar un ap de un controller a otra instalación nueva de un controller. Usamos el comando set-inform http//<controller ip>:8080/inform. Particularmente estoy migrando el controlador a un contenedor docker. No se si tiene que ver o no. Hay veces que el comando set-inform no aparece en bash despues de conectarnos por ssh al ap con ubnt@ubnt. Encontré este comando en un foro de home assistant que literalmente me solucionó el problema. ssh admin@<your_unifi_ap_ip> "/usr/bin/mca-cli-op set-inform http://<your_unifi_controller_ip>/inform ; exit" l ink ¡Gracias  JeremiahCornelius !

Copying files from remote to localhost

Just for Linux Remote host to localhost: username@remotehost.com:file /local_directory/  From localhost to Remote host scp file username@remotehost.com:/remote_directory/ 

Prevent ssh timeouts

Locally add the following to ~/.ssh/config ServerAliveInterval 120 # null packet every 120 seconds On the server side add the following: ClientAliveInterval 120 # null packet every 120 seconds ClientAliveCountMax 720 # 24hs Done!

fail2ban unban ip

To search all the ips that were banned we enter interactive mode: $ fail2ban-client -i Then we check a jail status, for example sshd : > status sshd the output: Status for the jail: sshd |- Filter |  |- Currently failed: 0 |  |- Total failed: 27 |  `- File list: /var/log/auth.log `- Actions    |- Currently banned: 37    |- Total banned: 38    `- Banned IP list: <a big list of banned ips> So, if we want to unban a particular ip address, let's say X Then, we execute: > set ssh unbanip (within interactive mode) Lastly, if you want to execute it directly from command line: $ fail2ban-client get <JAIL> actionunban <IP-ADDRESS> That's all.

Cleaning Bash History...

Just run: cat / dev / null > ~/. bash_history && history - c && exit

The document "mydoc" could not be saved. You don’t have permission

Just run the following command: $ chmod -R -N mydoc

*** System Restart Required *** - Ubuntu

Which packages need a system reboot? Just check /var/run/reboot-required.pkgs

Install memcached in Mac OS El Capitan

The easiest way to install memcached is to use homebrew package installer: $ brew install memcached This locates memcached in /usr/local/opt/memcached/bin/ Starting memcached (by default at port 11211 or with -p port_number): $ memcached -p 9000 To have launchd start memcached now and restart at login: $ brew services start memcached To change the default ram size (64mb) used by memcached use -m option: $ memcached -m 128  -p 9000 Lastly, run memcached as a daemon with -d: $ memcached -d -p 9000

Install compass in Mac Os El Capitan

So, $ sudo gem install compass is not working? Do you have ruby installed? If not install it using brew: $ sudo brew install ruby  First try updating your gem version: $ sudo gem update --system Then try again installing compass: $ sudo gem install compass Oh... now you get a: Fetching: compass-1.0.3.gem (100%) ERROR:  While executing gem ... (Errno::EPERM)     Operation not permitted - /usr/bin/compass Run the following: $ sudo gem install -n /usr/local/bin compass Done.

Test a webpage speed using Pingdom

Outstanding web page to measure a webpage speed. https://tools.pingdom.com/
"Bad programmers worry about the code. Good programmers worry about data structures and their relationships." Linus Torvalds

Python Ipdb Cheatsheet

Command CheatSheet h(elp) : Without argument, print the list of available commands. With a command name as argument, print help about that command. w(here) : Print a stack trace, with the most recent frame at the bottom. An arrow indicates the “current frame”, which determines the context of most commands. d(own) : Move the current frame one level down in the stack trace (to a newer frame). u(p) : Move the current frame one level up in the stack trace (to an older frame). b(reak) : [ ([filename:]lineno | function) [, condition] ] With a filename:line number argument, set a break there. If filename is omitted, use the current file. With a function name, set a break at the first executable line of that function. Without argument, list all breaks. Each breakpoint is assigned a number to which all the other breakpoint commands refer. The condition argument, if present, is a string which must evaluate to true in order for the breakpoint to be honored. tbreak : [ ([filenam...

How to turn on "three finger drag" on Mac Os X

From the Apple menu, choose System Preferences.  Click the Accessibility icon.  Choose Mouse & Trackpad from the options on the left.  Click Trackpad Options.  Place a checkmark next to "Enable dragging."  From the related pop-up menu, choose “three finger drag” so there's a checkmark next to it.  Click OK.

Latex superscript outside math mode

So...you want to avoid doing:   $9^{th}$ July . Then, you can use textsuperscript like: 9\textsuperscript{th} July .

RIP BB King

Image

Stories of the Past and Future (from xkcd)

Image
source:  http://xkcd.com/1491/large/

Argentina - Suiza

Image

Messi

Image

Internationalization

Image
Daily, millions of users consume a huge amount of information available in Internet. The explosion of mobile devices has done nothing but encourage the devouring attitude. Few years ago, the only method accessible was using a desktop computer. Nowadays, users in their way to work or back to home, access different to websites looking for information to satisfy their desires. Companies have seen this opportunity and have turned to distribute content worldwide. One of the big issues is that users decline to be limited to a fixed category no matter if it is cultural, political or language. Customers demand that their ideas, culture and beliefs are respected. The fact is that these customers are no longer situated in a specific area or country; furthermore, they are located all over the globe. News, politics, shopping, games, are some of the main areas that an average users prefer. If you want to succeed and increase your the number of loyal clients, you have to think globally . O...