Profile | download (kb/s) | upload (kb/s) | latency (ms) |
---|---|---|---|
Native | 0 | 0 | 0 |
GPRS | 50 | 20 | 500 |
56K Dial-up | 50 | 30 | 120 |
Mobile EDGE | 240 | 200 | 840 |
2G Regular | 250 | 50 | 300 |
2G Good | 450 | 150 | 150 |
3G Slow | 780 | 330 | 200 |
This file contains 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
// ==UserScript== | |
// @name osxdaily-ads-remover | |
// @namespace az | |
// @include http://osxdaily.com/* | |
// @version 0.1.0 | |
// @grant none | |
// @author azul | |
// @description remove ads on osxdaily.com | |
// ==/UserScript== |
This file contains 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
# alias backup | |
alias backup-appname='ssh -i ~/path_to/sshkey.pem user@ip_address "tar jcfv /fullpath_server_directory/filename-`date +%F.%H%M`.tar.bz2 /fullpath_server_directory/app_directory"' | |
# alias rsync | |
alias rsync-appname='rsync -a -e "ssh -i /local_fullpath_to/sshkey.pem -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" -rz --progress --delete-after /local_fullpath_to/app_directory/ user@ip_address:/fullpath_server_directory/app_directory/' | |
This file contains 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
<?php | |
class Pipeline | |
{ | |
public static function make_pipeline(...$funcs) | |
{ | |
return function($arg) use ($funcs) | |
{ | |
# calling each function in the make_pipeline in order | |
foreach($funcs as $function) { | |
# Store the triggering value in first function of args |
This file contains 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
<?php | |
class Palindrome | |
{ | |
public static function isPalindrome($word) | |
{ | |
$str = strtolower($word); | |
if ($str == strrev($str)) | |
return TRUE; | |
else |
This file contains 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
select name from employees where id not in (select managerId from employees m where managerId is not null) | |
-- ref: https://sqliteonline.com/#fiddle-5c2f897f7180djmyjqi96d0a |
This file contains 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
SELECT COUNT(*) FROM students WHERE firstName='John'; |
This file contains 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
function appendChildren(decorateDiv) { | |
var allDivs = document.getElementsByTagName("div"); | |
var numberOfDivs=allDivs.length; | |
for (var i = 0; i < numberOfDivs; i++) { | |
var newDiv = document.createElement("div"); | |
decorateDiv(newDiv); | |
allDivs[i].appendChild(newDiv); | |
} | |
} |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Company page</title> | |
</head> | |
<body> | |
<p>Welcome! Here you can find the following things:</p> | |
<ol> | |
<li><a href="#logo"><em>Company's logo</em></a></li> |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Avatar</title> | |
<style> | |
.avatar { | |
width: 150px; | |
height: 150px; |
NewerOlder