Skip to content

Instantly share code, notes, and snippets.

View infacq's full-sized avatar

Muhaimin infacq

  • Seri Kembangan, Selangor Malaysia
View GitHub Profile
@infacq
infacq / config.json
Last active August 29, 2015 14:14 — forked from anonymous/config.json
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "darken(#41cac0, 6.5%)",
"@brand-success": "rgb(28, 184, 65)",
@infacq
infacq / example-usage.js
Last active August 29, 2015 14:05 — forked from nedga055/example-usage.js
plupload example usage with requirejs
// Add this to the onRender() of the view you want to add your file upload to
// The options passed in will override the default Plupload options
// (http://www.plupload.com/documentation.php)
this.fileUploadView = new FileUploadView({
el: '#upload-container',
url: 'upload.php',
successMessage: 'Your file uploaded successfully.'
});
this.fileUploadView.render();
define(function(require) {
'use strict';
var _ = require('underscore')
return {
handleAjaxSuccess: function() {
if (_.isFunction(this.closeForm)) {
this.closeForm()
}
<?php
/**
* On-the-fly CSS Compression
* Copyright (c) 2009 and onwards, Manas Tungare.
* Creative Commons Attribution, Share-Alike.
*
* In order to minimize the number and size of HTTP requests for CSS content,
* this script combines multiple CSS files into a single file and compresses
* it on-the-fly.
*
@infacq
infacq / form.php
Created January 13, 2014 04:01 — forked from mikaelz/form.php
<?php
require dirname(__FILE__) . '/functions.php';
$module = md5('MODULE_NAME');
$page_url = sanitize($_SERVER['PHP_SELF']);
if (isset($_POST['firstname']))
require dirname(__FILE__) . '/save.php';
@infacq
infacq / Twitter Bootstrap Radio Button Form Inputs.html
Last active December 26, 2015 17:59 — forked from canuk/Twitter Bootstrap Radio Button Form Inputs.html
another clean way getting value from hidden input radio when using Twitter Bootstrap 3
<form>
<div class="btn-group" data-toggle-name="is_private" data-toggle="buttons" >
<label class="btn btn-default">
<input type="radio" name="private" value="1"> Yes
</label>
<label class="btn btn-default">
<input type="radio" name="private" value="0"> No
</label>>
</div>
<input type="hidden" name="is_private" value="0" />
// Collecting all unique affected app version for a given data set
var jsonStats = [
{app_versions: ['1.2','1.2.3']},
{app_versions: null},
{app_versions: ['1.2','1.3']}
];
var app_versions = _.uniq(_.flatten(_.compact(_.map(jsonStats, function(day){return day.app_versions }))));
// ["1.2", "1.2.3", "1.3"]
// Bye bye stupid for loops!
@infacq
infacq / 1.js
Created September 18, 2013 08:56 — forked from mxriverlynn/1.js
var data = {
type: "something",
name: "whatever",
addresses: [
{
type: "read_address",
address: "1/2/3",
value: "10"
},
{