Skip to content

Instantly share code, notes, and snippets.

View maxparm's full-sized avatar

Maxime Parmentier maxparm

View GitHub Profile
@maxparm
maxparm / toggle-ajax-loading.css
Last active January 21, 2021 02:57
Javascript - Toggling a loading screen with jQuery ajax
.loading-container {
position:absolute;
top:0;
right:0;
bottom:0;
left:0;
display:none;
}
.loading-container:before {
position:absolute;
@maxparm
maxparm / EnvironmentHelper.h
Created October 10, 2012 21:47
iOs Environment Helper
//
// Environment.h
//
// Inspired by http://blog.carbonfive.com/2011/06/20/managing-ios-configurations-per-environment-in-xcode-4/
//
#import <Foundation/Foundation.h>
@interface EnvironmentHelper : NSObject
@maxparm
maxparm / biplane-ajax-create-update-user.js
Created September 21, 2012 01:08
Ajax create/update user
$.ajax({
data: {
fb_uid: 1,
fb_first_name: '',
fb_last_name: '',
fb_access_token: ''
},
dataType: 'json',
type: 'POST',
url: Invoke.env.app.base_url + '/user/create',
@maxparm
maxparm / center-vertically.html
Created August 11, 2012 18:34
Center vertically any content in CSS
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<style type="text/css">
​.wrapper {
height:200px;
border:2px solid #CCC;
background:#eee;
}
@maxparm
maxparm / remove-highlight-color.css
Created July 31, 2012 16:38
CSS - Remove highlight color
body {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
@maxparm
maxparm / .htaccess
Created July 13, 2012 15:37
.htaccess with appropriate CORS header
<IfModule mod_rewrite.c>
Header add Access-Control-Allow-Origin "*"
Header add Access-Control-Allow-Methods: "GET,POST,OPTIONS,DELETE,PUT"
Header add Access-Control-Allow-Headers: "Content-Type"
RewriteEngine on
RewriteBase /
</IfModule>
@maxparm
maxparm / helvetica.css
Created July 13, 2012 15:02
Helvetica with Arial Degradation
body {
font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
font-weight: 300;
}
@maxparm
maxparm / fbload2.html
Created June 5, 2012 18:41
JS - Start app when FBJS and others libraries are all loaded.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
</head>
<body>
<div id="fb-root"></div>
<script>
// Load the SDK Asynchronously
@maxparm
maxparm / fbload.html
Created June 4, 2012 18:22
JS - Facebook Loading Flag
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Meta -->
<meta charset="utf-8">
<!-- Javascript -->
<script type="text/javascript">
@maxparm
maxparm / jquery-mobile-config.js
Created May 31, 2012 23:57
jQuery Mobile - Disable auto-rendering
$(document).bind("mobileinit", function(){
$.mobile.autoInitializePage = false;
});