SELECT REPLACE(total_CVEs, ',', '') from vulnerabilities_tbl WHERE REPLACE(total_CVEs, ',', '') >= 10000;
Author: xorprime
Bulk upload DHCP static IP MAC mapping in EdgerouterX
Updating the Name of static IP/MAC mapping is not allowed in the GUI and there is no easy way to do these changes in bulk. With the approach below, you can also update the assignment of IP and organise things to your hearts content.
- Format the existing mapping into a tab delimited format in the order of Name, IP and MAC. You can get the existing mapping by downloading the config file.
- Copy the entries from config.boot file.
static-mapping name1 {
ip-address 192.168.0.49
mac-address xx:xx:xx:xx:xx:xx
}
static-mapping name2 {
ip-address 192.168.0.126
mac-address xx:xx:xx:xx:xx:xx
}
- Convert this to tab delimited format using Sublime text or Notepad.
name1 192.168.0.49 xx:xx:xx:xx:xx:xx
name2 192.168.0.126 xx:xx:xx:xx:xx:xx
- Tweak the bulk import code (script.x) from here using the order of your leases.txt, LAN name and subnet.
ubnt@router:
~$
vi script.x
#!/bin/vbash
source /opt/vyatta/etc/functions/script-template
configure
while read name ip mac
do
set service dhcp-server shared-network-name LAN subnet 192.168.0.0/24 static-mapping $name ip-address $ip
set service dhcp-server shared-network-name LAN subnet 192.168.0.0/24 static-mapping $name mac-address $mac
done < leases.txt
commit
save
exit
- Paste the tab delimited text.
ubnt@router:
~$
vi leases.txt
- Delete the existing static mapping.
ubnt@router:~$delete service dhcp-server shared-network-name LAN subnet 192.168.0.0/24 static-mapping
- Run the script.
ubnt@router:
~$
sh script.x
My self care
I have been swimming for almost a week and then I felt crook last night so I decided to sleep early.
I woke up today with body aches and a slight sore throat so I decided not to come to work physically. We just dropped the kids at school and had breakfast in a Vietnamese place nearby.
Afterwards, we go home and I decided to take a nap.
When I woke up, I checked my temperature and it is homing at 37 so I decided to swim for about half an hour.
Then I eat my lunch consisting of cup noodles, two slices of brioche bread, watermelon and an apple with cranberry drink.
I sat down perusing the previews of recently added videos in Netflix.
Now I’m lying in bed again, waiting to nap after I finish this post. This is my self care.
Running Windows 10 on iMac Late 2013 from a thunderbolt drive on 2020
This is how I installed Windows 10 on iMac Late 2013 upgraded to 24GB of RAM. I used the Buffalo MiniStation Thunderbolt upgraded with Crucial MX 500 SSD external drive.
- Get Bootcamp Drivers using brigadier.
- Download Windows 10 ISO e.g. Win10_1607_English_x64.iso.
- Use ‘Quick Install Windows’ from Winclone 10.0.
- Select the Windows 10 ISO and the mounted WindowsSupport.dmg (Bootcamp Drivers).
- Select the destination thunderbolt drive.
Fixing the Razer Mako 2.1 clicking sound
The speaker started doing a clicking sound every time it is turned on. It goes away after a while but it becomes an annoyance especially if you need to use it immediately.
To fix this, you need to replace the bad capacitor C125 by Fujicon. Mark orientation accordingly as capacitors have polarity. The grey colour side should be facing opposite the aluminium slab.
What you need is a radial capacitor that is 4.7uF 25V 85°C. Look for the Rubycon brand if you can.
I found this Panasonic 4.7 uF 25V 85C capacitor in Farnell for about $1.42 for 5 pieces though you only need one.
They have an overnight shipping for about $12 coming from Chester Hill NSW.
To see more pictures, you can visit this French site http://www.mxp2.com/trucs-et-astuces/divers/-razer-mako-probleme-de-son-tap-tap-tap-s396.html
I am about to get a Sonos playbar but I guess I will have to squeeze the remaining life out of this great box.
Baking a macbook pro early 2008 after a hair dryer fail
My trusty Macbook Pro early 2008 (Penryn, 4gb, 840 pro ssd) has failed to boot and no amount of Cmd + Option + P + R can revive it. This happened the next day after I bought a Macbook Air 2013. So I thought I will tinker with it as I have nothing to loose except for an app mockup that I have toiled around for two days.
First, I tried reviving it using a hair dryer method as it worked before with Xbox 360. I have cleaned it up and applied a thermal paste (Zalman). It has produced the wake-up sound but no luck in booting.
Then I stumbled with this blog by Russell Heistuman about baking the logic board of a Macbook Pro and give it a try.
So I preheated the oven for 10 minutes setting it to “Bake” and 190°C. I placed the board on top of baking tray with an aluminum balls as advised from the blog. Then I timed it at 7 minutes and 30 seconds.
I let it cool down for 15 minutes. Re-apply the thermal paste and re-assemble the whole thing. I heard the boot sound and it was music to my ears. Thanks to Russell for the second life of this MBP.
Running phonegap project in IOS emulator without opening Xcode
Running phonegap without opening xcode ide
Open Terminal
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
brew doctor
brew install ios-sim
In phonegap project folder, go to cordova and double click emulate i.e. ~/phonegap/MyApp/cordova/emulate
Enable and add local git repository to Xcode
Click on Xcode then Preferences or Cmd+, select Download and then Components. Install the Command Line Tools.
After complete installation, go to Terminal and cd to the project directory. Issue the following command:
git init
git add .
git commit -m "Initial commit"
You can go to Xcode Organizer in the Repositories section to use the GUI git.
Moving from Xaraya 1.2 to WordPress 3.5
I’m about to say that this is a migration but what I have achieved only is just moving the articles from Xaraya to WordPress. I have to bite the bullet because upgrading to Xaraya 2.0 (Jamaica) is going to take the same effort.
So I decided to focus on articles only together with the related media.
In xaraya, render the page as rss i.e. domain.com/index.php/frontpage/?startnum=1&theme=rss . Download the xml.
In WordPress, use Tools > Import > RSS and then upload the xml from Xaraya.
The following are the plugins that I have used to configure WordPress closer to my previous Xaraya install:
- Login Logout
- Members
- Multicons
- Register Plus Redux
- RSS Importer
- Simple User Profile
- WP Hide Dashboard
- Akismet
Lastly, I have applied the 2012 theme that comes in the default install which enabled responsive design.
It’s not a perfect process but this has given me the opportunity to review the site and consolidate things like categories, pages and user management.
ClickMap Overlay and ClickMap Report
The difference in the data being reported in these two reports is mainly due to the lack of s_objectID variable that is implemented using onclick. This can be manual or through a JS plugin (only obtained through Omniture Consulting) because clickmap is confused by change of layouts and url query strings.
More information
http://blogs.adobe.com/digitalmarketing/analytics/how-clickmap-does-what-it-does/