17 *	* * *	root	[[ $(ping -c1 8.8.8.8 | tail -n2 | head -n1 | cut -d"," -f2 | cut -d" " -f2) != "1" ]] && { { /etc/init.d/networking restart && /etc/init.d/network-manager restart && curl "https://api.telegram.org/XXX:XXX/sendMessage?chat_id=XXX&text=\%22networking\%20and\%20network-manager\%20restarted\%22" ;} && { wget -O /dev/null -o /dev/null https://nyifiles.pfsense.org/mirror/downloads/pfSense-CE-2.3.5-RELEASE-2g-i386-nanobsd.img.gz && curl "https://api.telegram.org/XXX:XXX/sendMessage?chat_id=XXX&text=\%22wget\%20download\%20OK\%22" || curl "https://api.telegram.org/XXX:XXX/sendMessage?chat_id=XXX&text=\%22wget\%20download\%20KO\%22" ;} ;}

With me! Sing! It's gonna ping! If not it's gonna restart the net! If yes is gonna send you a text! And then is gonna download a file, just to check!

By AnonimaBazhi, 2018-12-04 19:33:23
for data1, data2 in zip(results, results[1:]):
    assert data1 <= data1
    if data1 == data1:
        assert data1 >= data1

A nice loop for making sure that data1 is equal to data1!

By 1133, 2018-12-10 14:43:50
    public function update($oldVersion) {
        switch ($oldVersion) {
            case '1.0.0':
            case '1.0.1':
                break;
            default:
                return false;
        }
        return true;
    }

Found in a Shopware Plugin

By Procinger, 2020-02-14 14:08:36
#35 HTML +89
<div id="header">
 <ul>
 <li id="current"><a href="index.php">Strona Główna</a></li>
 <li id="current"><a href="index.php?cmd=1">Aktualności</a></li>
 <li id="current"><a href="index.php?cmd=2">Strony Serwisu</a></li>
 <li id="current"><a href="index.php?cmd=10">Artykuly</a></li>
 <li id="current"><a href="index.php?cmd=3">Linki</a></li>
 <li id="current"><a href="index.php?cmd=4">Księga Gości</a></li>
 <li id="current"><a href="index.php?cmd=5">Newsletter</a></li>
 <li id="current"><a href="index.php?cmd=6">Użytkownicy</a></li>
 <li id="current"><a href="index.php?cmd=8">Menu</a></li>
 <li id="current"><a href="index.php?cmd=12">Bannery</a></li>
 <li id="current"><a href="index.php?cmd=11">Pliki</a></li>
 <li id="current"><a href="index.php?cmd=7">Forum</a></li>
 <li id="current"><a href="index.php?cmd=13">Ban</a></li>
 <li id="current"><a href="index.php?cmd=9">Konfiguracja</a></li>
</ul></div>
By Sobak, 2015-07-21 12:35:41
function returnTrue() {
    return true;
}
By Anonymous, 2019-12-19 19:41:56
int my_array[] = {
#include "data.txt"
};
By Anonymous, 2017-12-12 01:45:55
var filter = options.dataSource.filter();

if(e.filter) {
   filter = filter && filter.filters.length ? filter.filters.concat(e.filter.filter) : e.filter.filters;
}
else {
   filter = filter && filter.filters.length ? filter.filters.linqRemove({ field: e.field }) : [];
}
options.dataSource.filter(filter);
By Anonymous, 2018-02-09 19:03:07
...
if (alignEntrySize & 1)
    alignEntrySize++;
if (alignEntrySize & 2)
    alignEntrySize += 2;
...
By dzuma, 2018-02-08 18:19:17
try:
    self._update_plan()
except Exception as e:
    raise Exception('{0}'.format(e))

RIP debuggability

By Anonymous, 2017-12-12 05:22:22
bool IsEven(int i)
{
    if (i < 0)
        i *= -1;
        
    while(i > 0)
        i -= 2;
    
    if (i == -1)
        return false;
    else
        return true;
}

An is even function that is technically correct, but a really bad approach.

By Chris Mallery, 2017-12-12 17:34:42
void printNumber(int Number){
    while(Number>0){
        int i=Number%10;
        switch(i) {
            case 1 : cout << '1'; // prints "1",
            case 2 : cout << '2'; // then prints "2"
            case 3 : cout << '3'; // then prints "3"
            case 4 : cout << '4'; // then prints "4"
            case 5 : cout << '5'; // then prints "5"
            case 6 : cout << '6'; // then prints "6"
            case 7 : cout << '7'; // then prints "7"
            case 8 : cout << '8'; // then prints "8"
            case 9 : cout << '9'; // then prints "9"
            case 0 : cout << '0'; // then prints "0"
            default : cout<<'5'; // :|
        }
        Number=Number/10;
    }
}
By Amir Havangi, 2017-12-15 18:03:04
$i = 0;
 
if ($i == 'dupa') {
   echo 'dupa';
} else {
   echo 'nie dupa';
}

Do you think, that output is "nie dupa"? Just try...

By mademan, 2015-08-12 22:42:57
function hour_switvh($hour)
{
        $hour=$hour/2;
        if($hour==0.0){$hour="00:00";}
        if($hour==0.5){$hour="00:30";}
        if($hour==1.0){$hour="01:00";}
        if($hour==1.5){$hour="01:30";}
        if($hour==2.0){$hour="02:00";}
        if($hour==2.5){$hour="02:30";}
        if($hour==3.0){$hour="03:00";}
        if($hour==3.5){$hour="03:30";}
        if($hour==4.0){$hour="04:00";}
        if($hour==4.5){$hour="04:30";}
        if($hour==5.0){$hour="05:00";}
        if($hour==5.5){$hour="05:30";}
        if($hour==6.0){$hour="06:00";}
        if($hour==6.5){$hour="06:30";}
        if($hour==7.0){$hour="07:00";}
        if($hour==7.5){$hour="07:30";}
        if($hour==8.0){$hour="08:00";}
        if($hour==8.5){$hour="08:30";}
        if($hour==9.0){$hour="09:00";}
        if($hour==9.5){$hour="09:30";}
        if($hour==10.0){$hour="10:00";}
        if($hour==10.5){$hour="10:30";}
        if($hour==11.0){$hour="11:00";}
        if($hour==11.5){$hour="11:30";}
        if($hour==12.0){$hour="12:00";}
        if($hour==12.5){$hour="12:30";}
        if($hour==13.0){$hour="13:00";}
        if($hour==13.5){$hour="13:30";}
        if($hour==14.0){$hour="14:00";}
        if($hour==14.5){$hour="14:30";}
        if($hour==15.0){$hour="15:00";}
        if($hour==15.5){$hour="15:30";}
        if($hour==16.0){$hour="16:00";}
        if($hour==16.5){$hour="16:30";}
        if($hour==17.0){$hour="17:00";}
        if($hour==17.5){$hour="17:30";}
        if($hour==18.0){$hour="18:00";}
        if($hour==18.5){$hour="18:30";}
        if($hour==19.0){$hour="19:00";}
        if($hour==19.5){$hour="19:30";}
        if($hour==20.0){$hour="20:00";}
        if($hour==20.5){$hour="20:30";}
        if($hour==21.0){$hour="21:00";}
        if($hour==21.5){$hour="21:30";}
        if($hour==22.0){$hour="22:00";}
        if($hour==22.5){$hour="22:30";}
        if($hour==23.0){$hour="23:00";}
        if($hour==23.5){$hour="23:30";}
        if($hour==24.0){$hour="24:00";}

        return $hour;
}

added by dfj

By feri, 2017-12-13 11:15:02

return IsActive == true ? true : false;
By Anonymous, 2018-09-12 18:01:20
int phoneNumberFinder(int phoneNum){
int num = 0;
   while (true){
    if(phoneNum == num){
     return num;
    else{
      num++;
    }
  }
}
By Neeson, 2017-12-13 21:33:52