Skip to content

Instantly share code, notes, and snippets.

@ruichuang
ruichuang / index.html
Created January 4, 2018 19:44
SVG contenteditable Skills
<header>
<p>You may edit the percentages below:</p>
</header>
<div id="wrapper">
<div class="innerdiv" contenteditable>
<svg viewBox="10 10 30 30">
<g id="alpha" transform="translate(25 25) rotate(-90)">
<circle id="aCirc" r="10" />
<path id="aPath" d="" ></path>
</g>
var toType = function(obj) {
return ({}).toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase()
}
body#body{
height: 100vh;
background-color: #675E79;
background: -webkit-linear-gradient(left top, #675E79, #D0A0A1 ); /* For Safari 5.1 to 6.0 */
background: -o-linear-gradient(bottom right, #675E79, #D0A0A1 ); /* For Opera 11.1 to 12.0 */
background: -moz-linear-gradient(bottom right, #675E79, #D0A0A1 ); /* For Firefox 3.6 to 15 */
background: linear-gradient(to bottom right, #675E79, #D0A0A1 ); /* Standard syntax (must be last) */
}
var firstMove;
window.addEventListener('touchstart', function(e){
firstMove = true;
});
window.addEventListener('touchmove', function(e){
if (firstMove) {
e.preventDefault();
firstMove = false;
}
http://mherman.org/blog/2016/11/05/developing-a-restful-api-with-node-and-typescript/#.WQNhWVPyuAw
https://www.safaribooksonline.com/blog/2014/03/18/keeping-homebrew-date/
https://www.aircrack-ng.org/doku.php?id=airodump-ng
Field Description
BSSID MAC address of the access point. In the Client section, a BSSID of “(not associated)” means that the client is not associated with any AP. In this unassociated state, it is searching for an AP to connect with.
PWR Signal level reported by the card. Its signification depends on the driver, but as the signal gets higher you get closer to the AP or the station. If the BSSID PWR is -1, then the driver doesn't support signal level reporting. If the PWR is -1 for a limited number of stations then this is for a packet which came from the AP to the client but the client transmissions are out of range for your card. Meaning you are hearing only 1/2 of the communication. If all clients have PWR as -1 then the driver doesn't support signal level reporting.
RXQ Receive Quality as measured by the percentage of packets (management and data frames) successfully received over the last 10 seconds. See note below for a more detailed explanation.
Beac
func imageWithColor(color: UIColor) -> UIImage {
let rect = CGRect(x: 0, y: 0, width: 1, height:1)
UIGraphicsBeginImageContext(rect.size)
let context = UIGraphicsGetCurrentContext()
context!.setFillColor(color.cgColor)
context!.fill(rect)
let image = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext()
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation batch="false" />
</system.web>
<system.webServer>
<handlers>
<add name="iisnode" path="server.js" verb="*" modules="iisnode" />
</handlers>
<rewrite>
@ruichuang
ruichuang / JS
Last active April 10, 2017 03:08
unary plus +
The unary plus operator precedes its operand and evaluates to its operand but attempts to convert it into a number
+3 // 3
+'3' // 3
+true // 1
+false // 0
+null // 0
+function(val){ return val } // NaN