Skip to content

Instantly share code, notes, and snippets.

View dariodiaz's full-sized avatar

Dario Diaz dariodiaz

View GitHub Profile
@laracasts
laracasts / gulpfile.js
Last active February 10, 2024 10:57
Example Laravel-specific Gulpfile from Laracasts.com
var gulp = require('gulp');
var gutil = require('gulp-util');
var notify = require('gulp-notify');
var sass = require('gulp-ruby-sass');
var autoprefix = require('gulp-autoprefixer');
var minifyCSS = require('gulp-minify-css')
var coffee = require('gulp-coffee');
var exec = require('child_process').exec;
var sys = require('sys');
@PavelPolyakov
PavelPolyakov / routes.php
Last active October 2, 2016 21:06
Complete example of the named routes for the Route::controller, Laravel 4.
<?php
// for Laravel 4.1.*
Route::controller('bank-accounts', 'Dashboard_BankAccountsController', array('getCreate'=>'dashboard.bank-accounts.create',
'postCreate'=>'dashboard.bank-accounts.create.post'));
Route::get('bank-accounts', array('as' => 'dashboard.bank-accounts', 'uses' => 'Dashboard_BankAccountsController@getIndex'));
// for Laravel 4.0.* it was possible to do like this
Route::get('bank-accounts', array('as' => 'dashboard.bank-accounts', 'uses' => 'Dashboard_BankAccountsController@getIndex'));
Route::controller('bank-accounts', 'Dashboard_BankAccountsController', array('getCreate'=>'dashboard.bank-accounts.create',
anonymous
anonymous / PHP.sublime-build
Created November 9, 2013 10:46
Executes PHP files with Sublime Text build system. Requires to have the PHP binary in your PATH.
{
"shell_cmd": "php \"${file}\"",
"working_dir": "${file_path}",
"selector": "source.php"
}
@steinmb
steinmb / gist:6205332
Created August 11, 2013 15:20
Sublimetext 2 PHP build system config
{
"cmd": ["php", "-d", "error_prepend_string=''", "-d", "error_append_string=''", "-d", "xdebug.default_enable='Off'", "-f", "$file"],
"file_regex": ".*(?: in )(.*) on line ([0-9]*)",
"selector": "source.php"
}
@adamgoucher
adamgoucher / htmlvalidation.py
Created November 16, 2012 04:24
checking for valid html with python
import requests
import json
class ValidationException(Exception):
pass
class Element34(object):
def __init__(self, driver):
self.driver = driver
@adamgoucher
adamgoucher / selectmenu.py
Created October 31, 2012 00:51
page object-ish class for jquery.ui.selectmenu and python webdriver
from selenium.common.exceptions import UnexpectedTagNameException
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.common.action_chains import ActionChains
class Selectmenu(object):
def __init__(self, webelement):
if webelement.tag_name.lower() != "select":
raise UnexpectedTagNameException(
"Selectmenu only works on <select> elements, not on <%s>" %
webelement.tag_name)
@adamgoucher
adamgoucher / samplepageobject.php
Created August 22, 2012 21:36
sample page object in php
<?php
namespace WebDriver;
require_once('dashboard.php');
require_once(dirname(__FILE__) . '/../../../PHPWebDriver/WebDriverWait.php');
require_once(dirname(__FILE__) . '/../../../PHPWebDriver/WebDriverBy.php');
class SauceLoginPage {
private $locators = array(
"username" => array(\PHPWebDriver_WebDriverBy::ID, 'username'),
@igrigorik
igrigorik / file.html
Created July 6, 2012 08:01
Example of early head flush on load time
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Hello</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
Hello World
</body>
@larrybotha
larrybotha / A.markdown
Last active December 28, 2022 19:00
Monokai Sidebar Theme | Sublime Text

Sublime Text Monokai Sidebar Theme

A theme for the sidebar in Sublime Text to match the workspace of the Monokai theme.

This theme only modifies the sidebar to better match the Monokai theme, without modifying any of the styling elsewhere defined by Monokai.

File location: Packages/User

For a theme that extends beyond just the sidebar, visit https://gist.github.com/umpirsky/5842174