Skip to content

Instantly share code, notes, and snippets.

@the-affy
the-affy / paralex bg css.css
Created July 23, 2014 07:13
paralex background
/* background setup */
.background {
background-repeat:no-repeat;
/* custom background-position */
background-position:50% 50%;
/* ie8- graceful degradation */
background-position:50% 50%9 !important;
}
/* fullscreen setup */
@eristoddle
eristoddle / phpcurl_fuck_your_cookiejar.php
Created January 31, 2014 19:12
PHP curl with cookies and no text files needed
<?php
function fetch($url, $cookies = null, $returnCookie = false) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
if($cookies){
curl_setopt($ch, CURLOPT_COOKIE, implode(';',$cookies));
}
curl_setopt($ch, CURLOPT_HEADER, 1);
@daaku
daaku / facebook-sample.php
Created February 9, 2011 06:18
A simple Facebook PHP example.
<?php
/**
* A simple Facebook PHP example.
*
* - This is not a "Facebook SDK".
* - This example uses Curl, Hash, JSON, Session extensions.
* - This does not use the JavaScript SDK, nor the cookie set by it.
* - This works with Canvas, Page Tabs with IFrames, the Registration Plugin
* and with any other flow which uses the signed_request.
@rozmiarek
rozmiarek / css: overflow hidden alternative
Created July 10, 2010 21:38
css: overflow hidden alternative
.elementWithFloatedChilds { height: 1%; }
.elementWithFloatedChilds:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}