Skip to content

Instantly share code, notes, and snippets.

qustosh

Block or report user

Report or block qustosh

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
@qustosh
qustosh / audit_ctrl.coffee
Created May 26, 2014 — forked from lawrencejones/auth.coffee
Basic auth module for angular
View audit_ctrl.coffee
auth = angular.module 'auth'
auth.directive\
( 'hljs'
, [ ->
restrict: 'A'
scope: src: '&hljs'
link: ($scope, $elem, attr) ->
(hl = (src) ->
$elem.html src
@qustosh
qustosh / Gruntfile.js
Created Jan 16, 2014 — forked from sgimeno/Gruntfile.js
A Gruntfile for Apache Cordova app development. Includes prepare, build and run tasks to mimic Cordova CLI commands. Usage: 'grunt <command> [platform]'. If no platform is provided Cordova will try to perform the task for all the installed platforms. Default task 'watch' watches for source changes and runs the prepare task.
View Gruntfile.js
module.exports = function ( grunt ) {
/**
* Load required Grunt tasks. These are installed based on the versions listed
* in `package.json` when you do `npm install` in this directory.
*/
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-exec');
@qustosh
qustosh / selenium_login_gmail.py
Created Jan 16, 2014 — forked from kingofhawks/selenium_login_gmail.py
Use selenium to auto login gmail account
View selenium_login_gmail.py
import time
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
driver= webdriver.Firefox()
#driver= webdriver.Chrome("E:\QA\Resource\WEBDRIVER\chromedriverserver\chromedriver.exe")
driver.get("http://mail.google.com")
@qustosh
qustosh / gist:8451755
Created Jan 16, 2014 — forked from ElmahdiMahmoud/gist:8451662
js: hide a DIV when the user clicks outside of it
View gist:8451755
$(document).mouseup(function (e)
{
var container = $("YOUR CONTAINER SELECTOR");
if (!container.is(e.target) // if the target of the click isn't the container...
&& container.has(e.target).length === 0) // ... nor a descendant of the container
{
container.hide();
}
});
@qustosh
qustosh / Laravel
Created Jan 6, 2014 — forked from kbirmhrjn/Laravel Resources
List of Laravel Resources:
View Laravel
1. laravel.com/docs
2. laravel.io
3. laravel-tricks.com
4. laracasts.com
5. laravel-recipes.com
6. cheats.jesse-obrien.ca
7. laravelweekly.com
8. http://fideloper.com
9. http://jasonlewis.me
10. http://culttt.com/search/?q=laravel
View eqecute task sequentially, with or without delay
function withDelay(delay, tasks){
var iterator = -1;
setTimeout( function(){
Iterator++;
tasks[iterator]();
@qustosh
qustosh / .htaccess
Created Apr 2, 2013
Better .htaccess
View .htaccess
RewriteEngine on
RewriteCond $1 !^(index\.php|(.*)\.(gif|jpe?g|png|js|css|ico))
RewriteRule ^(.*)$ /index.php/$1 [L]
View gist:5294461
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="css/main.css">
<title></title>
@qustosh
qustosh / src#bar.js
Created Apr 2, 2013 — forked from jbuck/src#bar.js
RequireJS example code
View src#bar.js
define(["util/baz"], function(Baz) {
return { baz: new Baz() };
});
View ipNumericValue.scala
"192.168.1.1".split('.').reverse.map(_.toLong).zipWithIndex.map(t => (t._1 << (t._2 * 8L))).reduce(_ | _)
You can’t perform that action at this time.