Skip to content

Instantly share code, notes, and snippets.

View umefarooq's full-sized avatar
🎯
Focusing

Umer Farooq umefarooq

🎯
Focusing
View GitHub Profile
@minipai
minipai / Less Grid.less
Created December 24, 2010 06:08
960 style grid in LESS
@grid_width: 60px;
@grid_num: 12;
@gutter: 10px;
@total_width: (@grid_width + @gutter * 2) * @grid_num;
.grid_width (@grid_num: 1) {
width: (@grid_width + @gutter * 2) * @grid_num - @gutter * 2;
}
@malixsys
malixsys / app.scss
Last active July 11, 2016 07:42
ionic framework validation
form i.icon.error {
color: $assertive;
}
form input + i.icon.error {
display: none;
margin-left: 8px;
}
form.ng-submitted input.ng-invalid + i.icon.error {
@roNn23
roNn23 / laravel.js
Last active July 16, 2019 11:41 — forked from JeffreyWay/laravel.js
Updated delete-script of Jeffrey Way to work with Laravel 5. And optimized the implementation for the CSRF token. #laravel
/*
<a href="posts/2" data-method="delete"> <---- We want to send an HTTP DELETE request
- Or, request confirmation in the process -
<a href="posts/2" data-method="delete" data-confirm="Are you sure?">
Add this to your view:
<script>
window.csrfToken = '<?php echo csrf_token(); ?>';
@asika32764
asika32764 / mysql-rand-between-two-values.sql
Created August 16, 2014 07:41
Mysql Rand() between 2 values
ROUND((RAND() * (max-min))+min)
@maddisondesigns
maddisondesigns / cookie-policy.md
Last active June 19, 2022 17:59
eCommerce Terms & Conditions and Privacy Templates
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
* An open source application development framework
*
* @package CodeIgniter * @author Rick Ellis
* @copyright Copyright (c) 2006, EllisLab, Inc.
* @license http://www.codeignitor.com/user_guide/license.html
* @link http://www.codeigniter.com * @since Version 1.0
*/
@RyanWarke
RyanWarke / dropzone.js
Last active March 23, 2023 22:56
Dropzone.js refresh page on upload of mutiple files.
Dropzone.options.uploadImagesForm = {
maxFilesize: 3,
acceptedFiles: '.jpg, .jpeg, .png, .bmp',
init: function() {
this.on('success', function(){
if (this.getQueuedFiles().length == 0 && this.getUploadingFiles().length == 0) {
location.reload();
}
});
}
@soufianeEL
soufianeEL / laravel.js
Last active June 18, 2023 05:25 — forked from JeffreyWay/laravel.js
You use Laravel 5 and you want to send a DELETE request without creating a form? This will handle the form-creation bits for you dynamically, similar to the Rails implementation. To use, import script, and create a link with the `data-method="DELETE"` and `data-token="{{csrf_token()}}"` attributes.
/*
Exemples :
<a href="posts/2" data-method="delete" data-token="{{csrf_token()}}">
- Or, request confirmation in the process -
<a href="posts/2" data-method="delete" data-token="{{csrf_token()}}" data-confirm="Are you sure?">
*/
(function() {
cordova plugin add https://github.com/brodysoft/Cordova-SQLitePlugin.git
@tristanisfeld
tristanisfeld / browsersync.js
Last active November 10, 2023 23:58
Gulp 4 - Multifile tasks w/ external config. Basic gulpfile template for use with multiple task files, using gulp-load-plugins
// =========================================================
// Gulp Task: browsersync
// NOTE: Using gulp v4
// Description: Sync sass, typescript, html, and browser
// using external config or add modify src
// npm install --save-dev browser-sync gulp-typescript gulpjs/gulp.git#4.0 gulp-load-plugins
// Options: node-sass gulp-sass || gulp-ruby-sass
// =========================================================
var config = require('../config.js');
var browserSync = require('browser-sync').create();