Skip to content

Instantly share code, notes, and snippets.

View n0wak's full-sized avatar
🌀
D R E A M C A S T

M. Nowak n0wak

🌀
D R E A M C A S T
View GitHub Profile
@n0wak
n0wak / gist:a99444f85011c6e28b47
Created June 2, 2014 10:26
Emoji poop image data
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAASVklEQVR4Xu2aC7BdVXnHf9/a
e599nveRm+TmdfOixCQiSSAJIQEM8YEQkSIaKz7GqmMFFcvYsT7Kq3UsKHZqW4dx8IEDrQO1
KgIKMoAKWFRAClJDRB55B0KS+zrn7MdaXw9rzuzpnTEJOMGA8p35Zp+9Z6/vu//fWutb6+x9
RVX5UzbDC2svA3gZwMsAXgbwMoB3r5rzw79cNfeud6+cc95pRw70/MkBUMtIrVxaM9Bf++Lc
oYHhty+f+fU3LJ4y/U8GwLDmHxSj1MuGyY0yMwaq75nZX9l++tFTLvuTAHDDfduH8zzLRB1x
CI1yyJSemKH+6sc3HDv45CkLeo/7owbwmiPqJ4CN1GWoTQlwlEOhvx4xvS+ePdhXvufURX2f
4DBYyB/AGrXw81EAWEeOguItQqiXQsKGEBn5x/WLGstv+vXoW/6oALzuyMaGmf3VY+NAQB3O
KQCCAEIoQiUKoQYCZ52+uHHnDf87euIfDYDecvC1eskQCQgOHN4UBQFECIxQiUEkRDU+4Y0L
qvfcuKm5ij+ABRdffDEvlL32iMqFA43y6xuViCgwADgFUQABut9RBDDgYRhjZl3xuUuWvuu8
T1/7kgZw7RWX3tJfj8NyHGBEKPqeiYZ6R0QwRpBnHRb+26UX5e/56wvufElOgVWzZNaURiMG
@n0wak
n0wak / konami_code_jquery
Created November 9, 2011 16:31
Twitter Length JS Konami Code (using jquery)
k=[];$("*").keydown(function(e){d=k.push(e.keyCode);if(d>11)k.shift();if(k.join()=="38,38,40,40,37,39,37,39,66,65,13")alert("!")})
@n0wak
n0wak / fbcheck.php
Created December 5, 2011 19:33
check if user has liked the page
//
// via https://twitter.com/#!/wesbos/status/143765415502413824
// check if user has liked the page
function has_liked()
{
if (!isset($_REQUEST["signed_request"])) {
return 2;
}
$signed_request = $_REQUEST["signed_request"];
list($encoded_sig, $payload) = explode('.', $signed_request, 2);
/* Kellum method
http://www.zeldman.com/2012/03/01/replacing-the-9999px-hack-new-image-replacement/
*/
.hide-text {
text-indent: 100%;
white-space: nowrap;
overflow: hidden;
}
/* 37 signals method
@n0wak
n0wak / gist:8318930
Last active January 2, 2016 14:49
CSS3 opacity hover transition pro tip

#PROTIP#

If you're using CSS transitions to fade in / fade out a child element on hover but don't want the element to be "active" to mouse events when it's hidden, don't mess around with display: none (doesn't work with transitions) or visibility: hidden (unneeded complexity), but instead set pointer-events: none on the child element and set pointer-events: auto to it on the hover.

@n0wak
n0wak / socket-cheatsheet.js
Created August 3, 2018 21:39 — forked from alexpchin/socket-cheatsheet.js
A quick cheatsheet for socket.io
// sending to sender-client only
socket.emit('message', "this is a test");
// sending to all clients, include sender
io.emit('message', "this is a test");
// sending to all clients except sender
socket.broadcast.emit('message', "this is a test");
// sending to all clients in 'game' room(channel) except sender
@n0wak
n0wak / Hello
Last active April 12, 2019 18:19
Let's be honest here,
none of us know what we're doing
here and how this stuff really
works.
| ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄|
| Github supports ICE |
|_____________|
(\__/) ||
(•ㅅ•) ||
/   づ
https://www.theverge.com/2019/10/9/20906213/github-ice-microsoft-software-email-contract-immigration-nonprofit-donation