Skip to content

Instantly share code, notes, and snippets.

🚀
Developing ideas

Jabran Rafique⚡️ jabranr

🚀
Developing ideas
Block or report user

Report or block jabranr

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@staltz
staltz / introrx.md
Last active Nov 13, 2019
The introduction to Reactive Programming you've been missing
View introrx.md
@iaserrat
iaserrat / FBLogin.swift
Last active Apr 7, 2016
This is a swift port of the official FacebookSDK login tutorial. It's been tested on Xcode 6 Beta 1 with the iOS 8 Simulator. You can find the official FB tutorial here: https://developers.facebook.com/docs/facebook-login/ios/v2.0
View FBLogin.swift
// YourProject-Bridging-Header.h
#import <FacebookSDK/FacebookSDK.h>
// AppDelegate.swift
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
.
@hdragomir
hdragomir / sm-annotated.html
Last active Oct 5, 2019
The deferred font loading logic for Smashing Magazine. http://www.smashingmagazine.com/
View sm-annotated.html
<script type="text/javascript">
(function () {
"use strict";
// once cached, the css file is stored on the client forever unless
// the URL below is changed. Any change will invalidate the cache
var css_href = './index_files/web-fonts.css';
// a simple event handler wrapper
function on(el, ev, callback) {
if (el.addEventListener) {
el.addEventListener(ev, callback, false);
@jabranr
jabranr / Format Text String to Tweet with JavaScript String prototype.js
Last active May 14, 2017
Format Text String to Tweet with JavaScript String.prototype
View Format Text String to Tweet with JavaScript String prototype.js
// Enable IE8 support for indexOf
if ( typeof Array.prototype.indexOf === 'undefined' ) {
Array.prototype.indexOf = function(item) {
for (var i = 0; i < this.length; i++) {
if (this[i] === item) {
return i;
}
return -1;
}
}
View mention-twitter.js
/*
*---------------------------------------------------------------
* Twitter
*---------------------------------------------------------------
*/
(function($, undefined){
"use strict";
var MentionApp = MentionApp || {};
@mscdex
mscdex / test.js
Last active Sep 12, 2019
sharing sessions between node.js and php using redis
View test.js
var express = require('express'),
app = express(),
cookieParser = require('cookie-parser'),
session = require('express-session'),
RedisStore = require('connect-redis')(session);
app.use(express.static(__dirname + '/public'));
app.use(function(req, res, next) {
if (~req.url.indexOf('favicon'))
return res.send(404);
@sindresorhus
sindresorhus / post.md
Created May 13, 2014
When to do parallax
View post.md

Never ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever ever eve

View Gruntfile.js
module.exports = function(grunt) {
grunt.initConfig({
sass: {
compile: {
options: {
style: 'compressed'
},
files: {
'styles/screen.css': 'styles/screen.scss'
@jabranr
jabranr / decimal2binary.php
Last active Feb 25, 2016
Converts the integer to binary and outputs list of integers that are power of 2 (http://jabran.me/using-special-integers-with-bitwise-operators-for-php-rbac/)
View decimal2binary.php
<?php
/**
* Converts the integer to binary and outputs list of integers that are power of 2
*
* @author: Jabran Rafique <hello@jabran.me>
* @param: integer $decimal
* @return: string
*/
function get_special_binary( $decimal ) {
@joaocunha
joaocunha / How To Hide The Select Arrow On Firefox.md
Last active Feb 25, 2019
How to hide <select> dropdown's arrow in Firefox when using "-moz-appearance: none;".
View How To Hide The Select Arrow On Firefox.md

This is no longer a bug. I'm keeping the gist for historical reasons, as it helped to get it fixed. Make sure to read the notes by the end of the post.

How to remove hide the select arrow in Firefox using -moz-appearance:none;

TL;DR (or, the fix)

  1. Set -moz-appearance to none. This will "reset" the styling of the element;
  2. Set text-indent to 0.01px. This will "push" the text a tiny bit[1] to the right;
You can’t perform that action at this time.