sudo nmcli dev wifi hotspot ifname wlan0 con-name "my-hotspot" ssid "my-hotspot" password "My HotsPoT Strong Password"
More info here
sudo nmcli dev wifi hotspot ifname wlan0 con-name "my-hotspot" ssid "my-hotspot" password "My HotsPoT Strong Password"
More info here
| ===================== Documentación ================================ | |
| Gema serialport: http://www.rubydoc.info/gems/serialport/SerialPort | |
| IO: http://www.rubydoc.info/stdlib/core/IO | |
| ===================== Documentación ================================ | |
| 1- Simulación puerto serial en linux: | |
| sudo apt-get install socat | |
| #en una consola: | |
| socat -d -d pty,raw,mode=777 pty,raw,mode=777 | |
| 2017/12/13 14:19:54 socat[3641] N PTY is /dev/pts/**21** | |
| 2017/12/13 14:19:54 socat[3641] N PTY is /dev/pts/**22** |
| pg_dump --host localhost --username "postgres" --format custom --no-privileges --file "/tmp/scada_bys_o239_14_11_2017.backup" "scada_bys" -W |
| pg_dump --host localhost --username "postgres" --format custom --no-privileges --file "/tmp/scada_bys_o239_14_11_2017.backup" "scada_bys" -W |
| require 'colorize' | |
| require 'rmodbus' | |
| require 'timers' | |
| ip="10.0.0.2" | |
| sl1 = ModBus::TCPClient.new(ip).with_slave(1) | |
| timers = Timers::Group.new | |
| now_and_every_five_seconds = timers.now_and_every(0.001) { | |
| begin | |
| sl1.holding_registers[0..1000]; puts "read #{Time.now.to_i}".green | |
| rescue Exception =>e |
| #require "plc_engine/daemons/plc_reading_engine" | |
| #require "plc_engine/daemons/plc_writing_engine" | |
| require 'colorize' | |
| require 'rmodbus' | |
| ip="10.0.0.2" | |
| sl1 = ModBus::TCPClient.new(ip).with_slave(1) | |
| sl2 = ModBus::TCPClient.new(ip).with_slave(1) | |
| Thread.new do |
| require 'singleton' | |
| class Connection | |
| include Singleton | |
| attr_accessor :data | |
| def initialize | |
| @data = {} | |
| end |
| portainer: | |
| restart: unless-stopped | |
| image: portainer/portainer | |
| ports: | |
| - "9000:9000" | |
| volumes: | |
| - /var/run/docker.sock:/var/run/docker.sock |
| Getting SMBIOS data from sysfs. | |
| SMBIOS 2.7 present. | |
| Handle 0x0005, DMI type 5, 20 bytes | |
| Memory Controller Information | |
| Error Detecting Method: None | |
| Error Correcting Capabilities: | |
| None | |
| Supported Interleave: One-way Interleave | |
| Current Interleave: One-way Interleave |
| # app/admin/recipe.rb | |
| index do | |
| #... | |
| column "Peso1/Peso2" do |f| | |
| div status_tag "#{f.peso} kg." if f.peso | |
| setpoint_lines=[f.sum_setpoints] | |
| setpoint_lines<< ((setpoint_lines[0]!=f.peso_batch)? "error" : "ok") | |
| title_error="Error" if setpoint_lines[1]=="error" | |
| div status_tag "#{setpoint_lines[0]} kg.", setpoint_lines[1], title: title_error || "" unless setpoint_lines[0].blank? | |
| end |