This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scanning devices within wifi area | |
http://www.libelium.com/products/meshlium/smartphone-detection/ | |
• The MAC address of the wireless interface, which allows to identify it uniquely. | |
• The strength of the signal (RSSI), which gives us the average distance of the device from the scanning point. | |
• The vendor of the smartphone (Apple, Samsung, etc) | |
• The WiFi Access Point where the user is connected (if any) and the Bluetooth friendly name. Users not connected to an AP will be showed as "free users". | |
• The Class of Device (CoD) in case of Bluetooth which allows us to differentiate the type of device (smartphone, handsfree, computer, LAN/network AP). With this parameter we can differentiate among pedestrians and vehicles. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If this json file won't become too big over the time you should try: | |
Create a javascript object with the table array in it | |
var obj = { | |
table: [] | |
}; | |
Add some data to it like | |
obj.table.push({id: 1, square:2}); | |
Convert it from an object to string with stringify | |
var json = JSON.stringify(obj); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IEEE 802.11 Radiotap Capture header (radiotap) | |
radiotap.antenna Antenna | |
Unsigned 32-bit integer | |
Antenna number this frame was sent/received over (starting at 0) | |
radiotap.channel Channel | |
Unsigned 32-bit integer | |
802.11 channel number that this frame was sent/received on | |
radiotap.channel.freq Channel frequency |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The websocket communication relies on the client-server logic, where a persistent connection between a server | |
and a client always exists. | |
the server opens a dedicated port where clients get connected. once happens, all connected app can send outgoing message to port and listen | |
to it for incoming message without additional requset. | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git log --graph | |
git log --graph --decorate --oneline | |
git log --graph --full-history --all --pretty=format:"%h%x09%d%x20%s" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm view webpack versions ------ list all versions | |
npm show webpack version ------ list latest version | |
webpack 1 vs 2 | |
- 2 handles ex6 imports | |
run webpack | |
./node_modules/webpack/bin/webpack.js <input file> <output file> | |
in package.json, do: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The function object has a length property set to the number of formal parameters it is declared with. | |
In JavaScript, variables don't have types -- values have types. | |
The typeof operator always returns a string | |
Variables that have no value = "undefined", an "undeclared" variable is one that has not been formally declared in the accessible scope. | |
The typeof operator returns "undefined" even for "undeclared" (or "not defined") variables | |
let a = 13.6 | 0;[ floor float numbers] | |
All bitwise operations except unsigned right shift, >>>, work on signed 32-bit integers. So using bitwise operations will | |
convert a float to an integer. - slightly faster than Math.floor - 32-bit signed integers only |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
before install rvm, install the mpapis public key. | |
$brew install gnupg gnupg2 | |
$gpg --keyserver hkp://keys.gnupg.net | |
--recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 | |
follow rvm website | |
test: rvm list / rvm use *.*.* / ruby -v | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
**opposite sets of each of these metacharacters by using their upper case letters** | |
\ escape char after | |
\d 0-9 | |
\D represents any non-digit character | |
\w alphanumeric letters and digits | |
\W any non-alphanumeric character (such as punctuation) | |
\b which matches the boundary between a word and a non-word character. | |
\. match single char (letter/digit/whitespace), wildcard | |
[] match any single char within [] will pass | |
[^] not to match any within [], excludes specific char |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
****** css selectors: | |
1. id selector can only use once in html file. | |
2. class selector can chain multiple class apply to same element | |
3. child selector '>', only select direct children of elements | |
4. descendant selector,all child of selected element | |
5. ~ combinator ex. p ~ span means selecting all <span> tags which is preceded by the p | |
and both of them share a common parent | |
6. p + span means first <span> palced immediately after <p> | |
7. ::before/after add cosmetic content before/after a element by using content, eg: | |
.boring-text::after { |