Skip to content

Instantly share code, notes, and snippets.

View sbouafif's full-sized avatar

Slim Bouafif sbouafif

View GitHub Profile
/** OS **/
var OSName="unknown";
if (navigator.appVersion.indexOf("Win")!=-1) OSName="win";
if (navigator.appVersion.indexOf("Mac")!=-1) OSName="mac";
if (navigator.appVersion.indexOf("X11")!=-1) OSName="unix";
if (navigator.appVersion.indexOf("Linux")!=-1) OSName="linux";
$('html').addClass('os-'+OSName);
/** Browser **/
@sbouafif
sbouafif / gist:c17e79c950b7ab727ffa
Created April 16, 2015 19:15
default-gulpfile.js
var gulp = require('gulp');
// Include Our Plugins
var jshint = require('gulp-jshint');
var sass = require('gulp-sass');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var rename = require('gulp-rename');
var minifyCSS = require('gulp-minify-css');
.clearfix:before,
.clearfix:after {
content: "";
display: table;
}
.clearfix:after {clear: both}
.clearfix {zoom: 1 /* For IE 6/7 (trigger hasLayout) */}
.DN {display: none}
.bold {font-weight: bold}
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
{
// --------------------------------------------------------------------
// JSHint Configuration, Strict Edition
// --------------------------------------------------------------------
//
// This is a options template for [JSHint][1], using [JSHint example][2]
// and [Ory Band's example][3] as basis and setting config values to
// be most strict:
//
// * set all enforcing options to true
@sbouafif
sbouafif / sketchfab-api.rb
Created September 17, 2012 12:16
Sketchfab API - Ruby
#!/usr/bin/ruby
# -*- coding: utf-8 -*-
require "uri"
require "net/https"
require "base64"
require 'rubygems'
require "json"
require "ruby-multipart-post" # gem install ruby-multipart-post
@sbouafif
sbouafif / sketchfab-api.sh
Created September 17, 2012 12:14
Sketchfab API - Bash/Curl
#!/bin/bash
path="./"
filename="Ellly.blend"
file=${path}${filename}
description="Test of the api with a simple model"
token_api="ff00ff"
title="Uber Glasses"
tags="test collada glasses"
private=1
@sbouafif
sbouafif / sketchfab-api.py
Created September 14, 2012 11:47
Sketchfab API - Python
# easy_install poster
from poster.encode import multipart_encode
from poster.streaminghttp import register_openers
import urllib2
# Register the streaming http handlers with urllib2
register_openers()
path="./"
filename="model.dae"
@sbouafif
sbouafif / dabblet.css
Created December 22, 2011 15:10
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height:100%;
@sbouafif
sbouafif / dabblet.css
Created December 22, 2011 13:03
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height:100%;