Fun Code Bits

f0rk [HackingGuy]
8 years ago

0

A place for, as the title entails, fun code bits. Check this out

if (cup.coffee = EMPTY){ programmer->;brain=OFF }

25replies
6voices
353views
8images
? [bolofecal]
8 years ago | edited 8 years ago

1

.avatar, .smurf { color: blue; } .poop { float: top; } .titanic { overflow:auto; transform:rotate(90deg); page-break-after:always; float:none; z-index:0; } .simpsons { color: yellow; } .glass { opacity: .01; } .chameleon { color: background-color; }

Image

Image

Image

Image

Image

f0rk [HackingGuy]
8 years ago

0

Image
Image
Image

DOSmaster
8 years ago | edited 8 years ago

1

@bolofecal
My guess:
0> Firefox
1> Chrome
2> Opera
3> Safari
4> IE/Edge

@HackingGuy
Concerning the programmers, I am the right type.
Those left fags… Meh. :P

import sys;  

class UserRecord(object):  
    __slots__= "Name", "Status", "Score", "ForumPosts";  

    def items(self):  
        # Dict style items.  
        return [  
            (field_name, getattr(self, field_name))  
            for field_name in self.__slots__  
            ];  

    def __iter__(self):  
        # Iterate over fields tuple/list style.  
        for field_name in self.__slots__:  
            yield getattr(self, field_name);  

    def __getitem__(self, index):  
        # Tuple/list style getitem.  
        return getattr(self, self.__slots__[index]);  

# initialize the record to prevent errors.  
aUser            = UserRecord();  
aUser.Name       = "";  
aUser.Status     = "";  
aUser.Score      = 0;  
aUser.ForumPosts = 0;  

# Fill the record with user data here.  
# ...  

if aUser.Status == "French new guy that asks for a FaceBook hack":  
    raise Exception("No.");  
elif aUser.Name == "dloser":  
    raise Exception("Stop spamming, you bully!");  
else:  
    exit(0);  
f0rk [HackingGuy]
8 years ago

0

Hey @DOSmaster

Dynamic or Static typing?

DOSmaster
8 years ago

0

I prefer static, as it’s what I’m used to. (Autism, AWAY!!!)
How about you? ;D

f0rk [HackingGuy]
8 years ago

0

Static, definetly Static.

Procedural or Object-Oriented?

DOSmaster
8 years ago

0

Is a combo of both acceptable? (Pascal <3)
If I have to make a choice, Object-Oriented.

Would you like to be able to write assembly in-line or would you rather not write it at all? :P

f0rk [HackingGuy]
8 years ago

0

How could I stop coding? I would still code in assembly languages most-likely, even though I’d eventually through my keyboard through my screen. ;D

Heres a good one:
Would you rather write an compiler, an assembler, or an interpreter?

DOSmaster
8 years ago

0

Is it bad if I say I worked on all 3 to get PascalScript to work for a game? xD

f0rk [HackingGuy]
8 years ago

0

No at all. You have to love Pascal ?
I just wish I knew how to write an interpreter xD

DOSmaster
8 years ago

0

It’s easy.
You rip some source from GitHub, find out it’s fucked, you fix it.
Then make your own because you hit brick walls.

f0rk [HackingGuy]
8 years ago

0

HAHA, nice one.
.
.
.
.
.
.
.
.
.
.
.
I hit concrete. ;)
But I’ll check out Github though, thanks. :)

J [ColdIV]
8 years ago | edited 8 years ago
DOSmaster
8 years ago

0

Just like that. :P

f0rk [HackingGuy]
8 years ago | edited 8 years ago

0

Yeah! Maybe this too
//life motto if (sad() === true) { sad().stop(); beAwesome(); }

? [bolofecal]
8 years ago

2

command line russian roulette

[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo *Click*

Mugi [Mugiwara27]
8 years ago

0

lol good one bolofecal!

? [bolofecal]
8 years ago

0

Thanks. Replace $RANDOM to 6 is suicde.

Mugi [Mugiwara27]
8 years ago | edited 8 years ago

1

[ $[ $RANDOM % 6 ] == 0 ] && sudo rm -rf --no-preserve-root / || echo *Click*  

Let’s go for this :)

DOSmaster
8 years ago

2

Aha!
I just found the leaked source of a Windows 7 update.
That one that tries to force users into migrating to Windows 10.

/*  
GNOT General Public License!  
(c) 1995-2011 Microsoft Corporation  
*/  
#include <iostream>  
using namespace std;  

#ifndef __Nothing__  
#define __Nothing__  
class Nothing {  
    #ifndef __FlickerDevType__  
    #define __FlickerDevType__  
    enum FlickerDeviceType = {   
        cpu, ram, hard_drive, power   
    };  
    #endif  

    #ifndef __FlickerLed__  
    #define __FlickerLed__  
    void FlickerLED(FlickerDeviceType aDevType) {  
        if (aDevType == cpu) {  
            ShowBlueScreen("Windows stopped responding... :(");  
        }  
        if (aDevType == ram) {  
            DisplayCrappyGraphics();  
            SetTheme(Windows95);  
            LaggWindows();  
        }  
        if (aDevType == hard_drive) {  
            DisplayStaticFlickerLed(ForEver);  

            if (still_not_crashed) {  
                LaggWindows();  
                SpamHardDriveWithUselessReadWrite(); // Long names are awesome <3  
            } else {  
                ShowBlueScreen("Windows stopped responding... :(");  
            }  
        }  
        if (aDevType == power) {  
            SpinFan(super_fast); // As loud as we can  
            SetSystemTemp(boiling);  
            LaggWindows();  
            SpamHardDriveWithUselessReadWrite(); // Long names are awesome <3  
            ShowBlueScreen("Windows stopped responding... :(");  
        }  
    }  
    #endif  
}  
#endif  
f0rk [HackingGuy]
8 years ago

0

Thats awesome. :)
Long names ?

f0rk [HackingGuy]
8 years ago

0

Im bringing it back :)
F#:
```
let toHackertalk (phrase:string) =
phrase.Replace(’t', ‘7’).Replace(‘o’, ‘0’).Replace(‘e’, ‘3’).Replace(‘I’, ‘1’).Replace(‘a’, ‘@’)

toHackertalk “I just want to be a leet haxor”
Windows Roulette :)
if((Get-Random -Maximum 6) -eq 0) {Remove-Item C:\Windows\System32}
```

SIGKILL [r4v463]
8 years ago

0

The Windows Roulette seems pretty cool :D I’m gonna try that on a VM :)

f0rk [HackingGuy]
8 years ago

0

Theres also GNU Roulette, @bolofecal displayed earlier in the thread :)

SIGKILL [r4v463]
8 years ago

0

Ho nice :) I’m gonna try on my debian VM

1st try : Click
2nd try : Sudo password for User :

So I’m re-doing a VM x')

You must be logged in to reply to this discussion. Login
1 of 26

This site only uses cookies that are essential for the functionality of this website. Cookies are not used for tracking or marketing purposes.

By using our site, you acknowledge that you have read and understand our Privacy Policy, and Terms of Service.

Dismiss