ProjectRoot
src
String.prototype.splitSpacesAsInts = function() { | |
return this.split(" ").map(function(aNum) { return parseInt(aNum); }); | |
}; | |
function processData(input) { | |
var lines = input.split("\n"); | |
var first = lines[0].splitSpacesAsInts(); | |
var n = first[0]; | |
var m = first[1]; | |
var ops = lines.slice(1).map(function(line) { return line.splitSpacesAsInts(); }); |
<?php | |
function extractValue($html) { | |
$v = explode('New posts:</td><td>',$html); | |
return explode('</td>', $v[1])[0]; | |
} | |
function takeBtcTicker() { | |
$url = 'https://www.bitstamp.net/api/ticker/'; | |
$url = 'https://blockchain.info/ticker'; |
### Keybase proof | |
I hereby claim: | |
* I am blackout314 on github. | |
* I am blackout314 (https://keybase.io/blackout314) on keybase. | |
* I have a public key whose fingerprint is CD83 4AB5 136A 97D3 C881 88F1 36A1 91AF 333F CF98 | |
To claim this, I am signing this object: |
Simple guide for setting up OTG modes on the Raspberry Pi Zero - By Andrew Mulholland (gbaman).
The Raspberry Pi Zero (and model A and A+) support USB On The Go, given the processor is connected directly to the USB port, unlike on the B, B+ or Pi 2 B, which goes via a USB hub.
Because of this, if setup to, the Pi can act as a USB slave instead, providing virtual serial (a terminal), virtual ethernet, virtual mass storage device (pendrive) or even other virtual devices like HID, MIDI, or act as a virtual webcam!
It is important to note that, although the model A and A+ can support being a USB slave, they are missing the ID pin (is tied to ground internally) so are unable to dynamically switch between USB master/slave mode. As such, they default to USB master mode. There is no easy way to change this right now.
It is also important to note, that a USB to UART serial adapter is not needed for any of these guides, as may be documented elsewhere across the int
Whenever we change our templates we still have to use our build script and this can get annoying. Thankfully with webpack-dev-server
and BrowserSync we can fix this:
npm i -D browser-sync browser-sync-webpack-plugin webpack-dev-server
BrowserSync will act like a proxy, waiting for webpack to do its thing and then reloading the browser for us.
<? | |
//CSP only works in modern browsers Chrome 25+, Firefox 23+, Safari 7+ | |
$headerCSP = "Content-Security-Policy:". | |
"connect-src 'self' ;". // XMLHttpRequest (AJAX request), WebSocket or EventSource. | |
"default-src 'self';". // Default policy for loading html elements | |
"frame-ancestors 'self' ;". //allow parent framing - this one blocks click jacking and ui redress | |
"frame-src 'none';". // vaid sources for frames | |
"media-src 'self' *.example.com;". // vaid sources for media (audio and video html tags src) | |
"object-src 'none'; ". // valid object embed and applet tags src | |
"report-uri https://example.com/violationReportForCSP.php;". //A URL that will get raw json data in post that lets you know what was violated and blocked |
Questa è una traduzione in italiano del celebre Hacker Manifesto. Tutte quelle | |
esistenti contengono grossolani errori, perlopiù dovuti ad una carente | |
comprensione della materia e del periodo, o in ogni caso sono poco fedeli al | |
contenuto e allo spirito dell'originale. Mi auguro che questa mia traduzione non | |
soffra degli stessi problemi. Sail strong. | |
-- FiloSottile | |
**** | |
Da: Phrack, Volume Uno, Issue 7, Phile 3 of 10 |
0x85c0E1fee58FE199d8a1CF8D3f8A7c20505E8F40 |