Pear for 1.4, mage for 1.5. File downloaded into /downloader/.cache/community/
./pear download magento-community/Shipping_Agent
./mage download community Shipping_Agent
| try | |
| { | |
| $payload = json_decode($_REQUEST['payload']); | |
| } | |
| catch(Exception $e) | |
| { | |
| exit(0); | |
| } | |
| file_put_contents('logs/github.txt', print_r($payload, TRUE), FILE_APPEND); |
| try { | |
| localStorage.setItem('test', 'test'); | |
| } catch (err) { | |
| if ((err.name).toUpperCase() == 'QUOTA_EXCEEDED_ERR') { | |
| document.write('<div style="padding:5%;margin:5%;background:#777;color:white;height:90%">We don\'t seem to be able to store the information needed for this app to work on your phone.<br /><br /> It\'s probably because you have enabled private browsing mode. If you\'d like to disable private browsing go to settings section on your phone.</div>'); | |
| } | |
| } |
| /*global gmap */ | |
| function getUserLocation(map) { | |
| if (navigator.geolocation) { | |
| navigator.geolocation.getCurrentPosition(function (position) { | |
| var point = new google.maps.LatLng(position.coords.latitude, | |
| position.coords.longitude); | |
| if (typeof getUserLocation.user_marker == 'undefined') { | |
| getUserLocation.user_marker = new google.maps.Marker({ | |
| position:point, |
| [ | |
| "a", | |
| "about", | |
| "above", | |
| "across", | |
| "after", | |
| "afterwards", | |
| "again", | |
| "against", | |
| "all", |
| var https = require('https'); | |
| var options = {method: 'HEAD', host: 'user.tent.is', path: '/'}; | |
| var req = https.request(options, function(res) { | |
| console.log(JSON.stringify(res.headers)); | |
| } | |
| ); | |
| req.end(); | |
| req.on('error', function(e) { |
| add | |
| sudo tc qdisc add dev eth0 root netem delay 250ms loss 20% reorder 25% 50% | |
| ----------------------- | |
| change ( I need to edit this, just putting some examples for now ) | |
| tc qdisc change dev eth0 root netem delay 250ms loss 20% reorder 25% 50% ) | |
| tc qdisc change dev eth0 root netem gap 5 delay 100ms reorder 25% 69% loss 25% ) |
| #!/bin/bash | |
| echo "Enter a host name (e.g. example.com):"; | |
| read domain; | |
| echo "" | |
| echo 'IP ADDRESSES' | |
| ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}' | |
| echo "Enter IP ADDRESS:"; | |
| read ipaddress; |
| Some quick notes from http://www.youtube.com/watch?v=UJPdhx5zTaw | |
| Don't mix types ( be sure the array is only of one type ) | |
| Don't read out of bounds | |
| Avoid operations with undefined values ( always initialize ) | |
| Don't add a new properties to the object during runtime | |
| Initialize all object members in constructor functions | |
| Always initialize object members in the same order | |
| Use 31 bit signed numbers in critical calculations | |
| Don't preallocate arrays elements | |
| Don't delete elements from arrays |
| //FightCode can only understand your robot | |
| //if its class is called Robot | |
| var Robot = function(robot) { | |
| }; | |
| var save_gun_positon = ''; | |
| Robot.prototype.onIdle = function(ev) { |