Skip to content

Instantly share code, notes, and snippets.

require 'ipaddr'
ips = IPAddr.new("192.168.1.0/24").to_range.to_a[1..-2]
pings = ips.map do |ipaddr|
ip = ipaddr.to_s
pid = spawn("ping -q -W 2 -c 1 #{ip}", [:err, :out] => "/dev/null")
[pid, ip]
end
p serial.write(0x02) # start byte
p serial.write('10E0') # commands
p serial.write(0.chr + 214.chr) # checksum byte 1 + 2
p serial.write(0x03)
BATA_SAT wlan1 -> get station
*************************************************
00:03:e8:03:37:f1, State: up, AID: 0
Authentication Type: Open System
WLAN Mode: 5GHz 54Mbps (802.11a)
Encryption: OFF Ciphers: NONE
Compression: ON decompIndex none
Power Save Mode: OFF
Rx Data Rate: 54, RxSignalStrength: 22, AckSignalStrength: 26
lastMainRate: *NA*
@tetherit
tetherit / gist:3a37e6eb0cf24a12908b
Created January 28, 2016 11:06
Huawei E3372 usb_modeswitch issue
Jan 28 16:19:23 TimeBox kernel: [ 4255.740069] usb 1-1.5: new high-speed USB device number 4 using dwc_otg
Jan 28 16:19:23 TimeBox kernel: [ 4255.829535] usb 1-1.5: New USB device found, idVendor=12d1, idProduct=14fe
Jan 28 16:19:23 TimeBox kernel: [ 4255.829567] usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jan 28 16:19:23 TimeBox kernel: [ 4255.829583] usb 1-1.5: Product: HUAWEI_MOBILE
Jan 28 16:19:23 TimeBox kernel: [ 4255.829598] usb 1-1.5: Manufacturer: HUAWEI_MOBILE
Jan 28 16:19:23 TimeBox kernel: [ 4255.829613] usb 1-1.5: SerialNumber: 0123456789ABCDEF
Jan 28 16:19:23 TimeBox kernel: [ 4255.886616] usb-storage 1-1.5:1.0: USB Mass Storage device detected
Jan 28 16:19:23 TimeBox kernel: [ 4255.887713] scsi host0: usb-storage 1-1.5:1.0
Jan 28 16:19:23 TimeBox kernel: [ 4255.947391] usbcore: registered new interface driver uas
Jan 28 16:19:23 TimeBox systemd[1]: Starting USB_ModeSwitch...
- set_fact:
ansible_connection_temporary: "{{ ansible_connection }}"
- set_fact:
ansible_connection: local
- name: Test local_action
become: false
connection: local
local_action: shell whoami
- @title = "Xanview: Compared to Others"
.row
.col-sm-2
h3 Thumbnail Search
.col-sm-5
p
' Footage is analysed to generate a
b "best" image
' for every 5 seconds of video. If a person runs past the camera, the "best"
I have added this IP address days ago and when I try to email, just as from the other servers, I get this error:
Jul 25 01:24:11 Timeline postfix/pickup[24641]: 6D42E9C0CA6: uid=1001 from=<no-reply@xanview.com>
Jul 25 01:24:11 Timeline postfix/cleanup[8863]: 6D42E9C0CA6: message-id=<55b2c91b6850e_2075e79e7447663@Timeline.mail>
Jul 25 01:24:11 Timeline postfix/qmgr[19358]: 6D42E9C0CA6: from=<no-reply@xanview.com>, size=771, nrcpt=1 (queue active)
Jul 25 01:24:41 Timeline postfix/smtp[8865]: connect to smtp-relay.gmail.com[173.194.65.28]:25: Connection timed out
Jul 25 01:24:41 Timeline postfix/smtp[8865]: 6D42E9C0CA6: to=<roman@xanview.com>, relay=smtp-relay.gmail.com[2a00:1450:4013:c01::1c]:25, delay=30, delays=0.01/0/30/0.02, dsn=5.7.1, status=bounced (host smtp-relay.gmail.com[2a00:1450:4013:c01::1c] said: 550-5.7.1 Invalid credentials for relay [2a01:7c8:aab0:3be:5054:ff:fecb:3e90]. 550-5.7.1 The IP address you've registered in Google Apps SMTP Relay service 550-5.7.1 doesn't match domain of the accoun
@tetherit
tetherit / gist:687adce4862c1a45991b
Last active August 29, 2015 14:21
bundle install fails with mv: cannot stat ‘/tmp/bundler20150512-27272-653i37json-1.8.2/cache/json-1.8.2.gem’: No such file or directory
$ bundle --version
Bundler version 1.9.7
$ gem --version
2.4.5
$ bundle install
Fetching gem metadata from https://rubygems.org/..............
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
# Running comments:
echo deb-src http://ppa.launchpad.net/brightbox/ruby-ng-experimental/ubuntu utopic main >> /etc/apt/sources.list
apt-get update
apt-get source ruby2.2
apt-get install chrpath dh-autoreconf libffi-dev libgdbm-dev libncurses5-dev libncursesw5-dev libreadline6-dev libyaml-dev systemtap-sdt-dev tcl8.5-dev tk8.5-dev
cd ruby2.2-2.2.1/
time dpkg-buildpackage
# Output:
failed: [vagrant_timebox] => (item=fdk-aac_latest_amd64.deb,x264_latest_amd64.deb,ffmpeg_latest_amd64.deb,opencv_latest_amd64.deb) => {"failed": true, "item": "fdk-aac_latest_amd64.deb,x264_latest_amd64.deb,ffmpeg_latest_amd64.deb,opencv_latest_amd64.deb", "parsed": false}
SUDO-SUCCESS-flaslutnesbsythsievxkingbuwkszot
Traceback (most recent call last):
File "/home/deployer/.ansible/tmp/ansible-tmp-1425334957.95-65881054914681/apt", line 2196, in <module>
main()
File "/home/deployer/.ansible/tmp/ansible-tmp-1425334957.95-65881054914681/apt", line 563, in main
force=force_yes, dpkg_options=p['dpkg_options'])
File "/home/deployer/.ansible/tmp/ansible-tmp-1425334957.95-65881054914681/apt", line 330, in install_deb
pkg = apt.debfile.DebPackage(deb_file)
File "/usr/lib/python2.7/dist-packages/apt/debfile.py", line 61, in __init__