Archive for the ‘Uncategorized’ Category

CodeIgniter Anti-Sopa Code

Here’s a copy of the code I’ve written and placed on the top of Homes.org. Feel free to use it however you want. Note: I’m not responsible for anything you do with it ;)
<? if(date(‘Ymd’, time()) == ’20120118′ && !$this->session->userdata(‘sopa’)): ?>
<? $this->session->set_userdata(‘sopa’, 1) ?>
<script type=”text/javascript”>
$(window).ready(function(){
$(‘.sopa_wrapper’).delay(200).animate({‘height’:50, ‘padding-top’:25, ‘padding-bottom’: 25});
$(‘.sopa_close’).click(function(){
$(‘.sopa_wrapper’).delay(0).animate({‘height’:0, ‘padding-top’:0, ‘padding-bottom’: 0});
});
});
</script>
<style type=”text/css”>

.sopa_wrapper{
overflow: hidden;
box-shadow: 0px 0px 10px #000;
padding: 0px;
position: fixed;
z-index: 4000000;
top: 0px; width: 100%;
background-image: url(‘http://www.alvincheung.com/sopa/background.png’);
height: 0px;
}

.sopa{
width: 1060px;
margin: 0 auto;
}
.sopa p{
float: left;
width: 700px;
margin: 8px 12px;
text-align: left;
}

.sopa_button{
padding: 8px;
float: left;
color: #fff;
margin: 5px;
position: relative;
top: -20px;
border-radius: 5px;
width: 150px;
text-align: left;
text-decoration: none;
}

.sopa_button.red{
background-color: #c00;
border: 1px solid #900;
}

.sopa_button.red:hover{
border:    1px solid #fff;
box-shadow: 0px 0px 6px #f00;
}

.sopa_button.blue{
background-color: #00c;
border: 1px solid #009;
}

.sopa_button.blue:hover{
border:    1px solid #fff;
box-shadow: 0px 0px 6px #00f;
}

.sopa_close{
float: right;
width: 48px;
height: 48px;
background-image: url(‘http://www.alvincheung.com/sopa/close_bw.png’);
margin: 0 20px;
}

.sopa_close:hover{
background-image: url(‘http://www.alvincheung.com/sopa/close.png’);
cursor: pointer;
}
</style>
<div>
<div>

</div>
<div>
<img src=”http://www.alvincheung.com/sopa/warning.png” style=”float: left;”/>
<p>
SOPA and PIPA damage the internet. Today we fight back. Please take today as a day of focus to
<br />learn about these destructive bills and do what you can to prevent them from becoming a reality.
</p>
<a href=”http://americancensorship.org/modal/call-form.html” rel=”nofollow” target=”_blank”><img src=”http://www.alvincheung.com/sopa/phone_telephone_call.png” />Make a call</a>
<br /><a href=”http://sopastrike.com/modal/strike-modal/index.html” rel=”nofollow” target=”_blank”><img src=”http://www.alvincheung.com/sopa/edit.png” />Sign the petition</a>
</div>
</div>
<? endif ?>

Preliminary Linup for Electric Daisy Carnival 2011 Dallas

Paul van Dyk
Axwell
Avicii
Diplo
Skrillex
Excision
Flux Pavilion & Doctor P
Wolfgang Gartner
Gabriel & Dresden
Markus Schulz
High Contrast
Dirtyphonics Live
12th Planet
Feed Me
Green Velvet
Mark Farina
Morgan Page
Mt. Eden
Felguk
Super 8 & Tab
Fred Everything
DJ Dan
Filo & Peri
Doorly
Justin Martin
Bart B More
Manufactured Superstars
Demarkus Lewis
Brett Johnson
plus more tba

Nocturnal Festival 2011 (Texas)

So uh, that was one of the best weekends of my life. I met some cool people. Gloved with some glovers. Learned to shuffle. Was allowed to shuffle/skank/glove on stage hahaha I’m not sure what that’s called but it was really fun. Met a dj. Tried to hoolahoop…. TRIED TO lol. Almost threw up from the amount of bass coming out of Porter’s set. Got crazy in the pit. Chilled in an amazing field under the stars and lazers. Bassnectar, Zed’s Dead, Avicii, Above & Beyond, Gareth emery, infected mushroom, and front row VIP pit for kaskade. Pure Awesome.

Up in the air

I’ve emptied my backpack, now all I need to do is figure out what to put back in it.

How to password protect your web directories the pro way.

http://www.elated.com/articles/password-protecting-your-pages-with-htaccess/

Great article, would read again.

Old people.

Screw all you useless, creepy, old people. If you fucked up at life, just admit it. There’s no point in douching yourself around us younger people because we all think you’re just as useless and creepy as everyone else your age.

How to make your web app post to someone’s facebook.

1. make a facebook application and get your appId, and secret.
2. get your user to login to facebook using the following code

<a href=https://www.facebook.com/login.php?api_key=YOUR_API_KEY&cancel_url=SomeRandomURL&display=page&fbconnect=1&next=ThePageYouWantFacebookToDirectUsersToAfterTheyLogin&req_perms=publish_stream&return_session=1&session_version=3&v=1.0″>
<img src=”http://scoops.widgets.rebelsites.com/images/connect_with_facebook.png” />
</a>

3. call this php code. don’t forget to include the facebook.php library… you can find it all over the internet. Probably best to get it directly from facebook’s gitHub.

$facebook = new Facebook(array(
‘appId’  => ‘YourAPPID‘,
‘secret’ => ‘YOURAPPSECRET‘,
‘cookie’ => true,
));
$facebookPostData = array(
‘message’ => ‘This is the message’,
‘picture’ => ”,
‘link’ => $this->session->userdata(‘donr’),
‘caption’ => ‘here is a small caption… I hope’,
‘description’ => ‘description wut?!?’,
‘source’ => ‘source goes here’
);
$facebook->api(‘/me/feed’, ‘post’, $facebookPostData);

5. ????

6. PROFIT

Cat Shit One

I got this yesterday and I’ve just gotta say that this is one of the best things I’ve seen in a long time. I’ve already watched this episode 4 times now and I plan on doing it again at least two more times today.

Before you go thinking this is some little kid’s show with bunnies in it, IT IS. But, these bunnies are veteran bunnies dropped into urban desert conflict. It’s got drama, action, suspense, and like all anime’s that underlying lesson that binds it all together perfectly. There’s even a little humor thrown in here and there… to be expected right? I mean… they’re so cute and fluffy!

That Packy is one crazy bastard. GO WATCH IT NOW!

Human Centipede

It’s been a second since I’ve been here and so much has happened. Learning, posting, removing, learning, post learning…

I’ve changed drastically externally and I can’t say if it’s for better or for worse but it does end up being a lot of fun in the end. However, I think I need to rethink my attitudes towards the people who I’m closest with because I know that who I am is who they learned to be friends with. The new guy is kind of annoying sometimes.

Man I’ve made a mess of things. Designate some time for everything.

On a completely unrelated note. lol Chad and I have been on a great movie hunt the past two days and this one was awesome.

http://www.imdb.com/title/tt1467304/

A must see! (Do not look at that link. You will see and read things that you are not interested in.)

Ideas

i’m comfortable in my own skin
imm a strong comfortable communicator
i’m in control of myslef
i’m no tneedy my power is mine
i have no sexual hangups, i’m comfortable with my biews

i can hold back grattifiacation
i don’t tollerate dissrespect of myself

smitten by a woman, i dont’ let it slip inderectly
dont’ let women use looks to take advantage (no
not selfconcious
put myself in my life first
can hold exceptional woman

understand culture, i get it
can deal with any test a woman thrwos at me
i live in my realtiy you are a guest
i am a cause, not an affect. i make things happen
I COULD BUT I WON’T.

—–

Poetry eh?

Return top