Skip to content

Instantly share code, notes, and snippets.

@mohamnag
mohamnag / gist:fc05ea86d725b49d6077
Last active August 29, 2015 14:08
CSS to over come the select arrow display and show a customized element
.custom-select {
-webkit-appearance: none;
-moz-appearance: window;
appearance: none;
border-radius: 0;
background: transparent;
text-indent: 0.01px;
text-overflow: '';
@mohamnag
mohamnag / gist:c570f78d47351b182b1c
Created November 3, 2014 09:36
Tweeter share button without the official JavaScript plugin
<style>
.tw-share-button {
white-space: nowrap;
position: relative;
background-color: #eee;
background-image: -webkit-linear-gradient(#fff,#dedede);
background-image: linear-gradient(#fff,#dedede);
border: #ccc solid 1px;
border-radius: 3px;
color: #333;
@mohamnag
mohamnag / gist:47ce52e2d90ff01f17a2
Created November 3, 2014 09:15
Facebook share button without using official JavaScript plugin
<style>
.fb-share-button {
background: #4c69ba;
background: -webkit-gradient(linear, center top, center bottom, from(#4c69ba), to(#3b55a0));
background: -webkit-linear-gradient(#4c69ba, #3b55a0);
background: gradient(linear, center top, center bottom, from(#4c69ba), to(#3b55a0));
background: linear-gradient(#4c69ba, #3b55a0);
border: none;
-webkit-border-radius: 2px;
color: #fff;
@mohamnag
mohamnag / gist:1f594d9e1119605fa409
Created January 20, 2014 22:10
This function sends GCM push messages using cakephp's HttpSocket
public function sendPush($token, $collapseKey, $title, $messageText) {
if(!is_array($token)) {
$token = array($token);
}
App::uses('HttpSocket', 'Network/Http');
$HttpSocket = new HttpSocket();
$data = array(
'registration_ids' => $token,