Skip to content

Instantly share code, notes, and snippets.

View carlesandres's full-sized avatar

Carles Andrés carlesandres

View GitHub Profile
@carlesandres
carlesandres / gist:1474680
Created December 14, 2011 00:49
Ejecución de script php desde web
<form action="../comgas_Detallar_Modulo.php" method="post" target="_blank">
<label>Describir módulo (p.e. ServiceContracts ): <input type="text" size=30 name=modulename></input></label>
<input type=submit value="Describir"></input>
</form>
@carlesandres
carlesandres / dabblet.css
Created October 18, 2012 15:04
sinbutton
/* sinbutton */
.sinbutton {
background: black;
background-image: -webkit-linear-gradient(top, #333, #666);
color: white;
font-size: 14px;
margin: 5px;
padding: 3px;
border-radius: 3px;
@carlesandres
carlesandres / dabblet.css
Created October 18, 2012 16:53
sinbutton
/* sinbutton */
.sinbutton {
background: black;
background-image: -webkit-linear-gradient(top, #333, #666);
color: white;
font-size: 14px;
margin: 5px;
padding: 3px;
border-radius: 3px;
@carlesandres
carlesandres / dabblet.css
Created October 24, 2012 16:46
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background-color:#269;
background-image: linear-gradient(white 2px, transparent 2px),
linear-gradient(90deg, white 2px, transparent 2px),
linear-gradient(rgba(255,255,255,.3) 1px, transparent 1px),
linear-gradient(90deg, rgba(255,255,255,.3) 1px, transparent 1px);
background-size:100px 100px, 100px 100px, 20px 20px, 20px 20px;
@carlesandres
carlesandres / Gruntfile.js
Last active December 15, 2015 10:59
Testing Gruntfile configurations for using PHP with Yeoman
'use strict';
//var lrSnippet = require('grunt-contrib-livereload/lib/utils').livereloadSnippet;
//var mountFolder = function (connect, dir) {
// return connect.static(require('path').resolve(dir));
//};
module.exports = function (grunt) {
// load all grunt tasks
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
@carlesandres
carlesandres / convert.pl
Created June 8, 2013 23:44
Perl sqlite to mysql conversion
#! /usr/bin/perl
while ($line = <>){
if (($line !~ /BEGIN TRANSACTION/) && ($line !~ /COMMIT/) && ($line !~ /sqlite_sequence/) && ($line !~ /CREATE UNIQUE INDEX/)){
if ($line =~ /CREATE TABLE \"([a-z_]*)\"(.*)/){
$name = $1;
$sub = $2;
$sub =~ s/\"//g;
$line = "DROP TABLE IF EXISTS $name;\nCREATE TABLE IF NOT EXISTS $name$sub\n";

My Vim shortcuts

,y Paste things copied before ,ss Search Ultisnips ,sl Search in current buffer with unite ,sw Search word under cursor (unite) ,m List my marks (unite) ma, mb ,... Set file-wide marks mA, mB,... Set project wide marks 'a, 'b, 'A Jump to mark ,V Open VimShell

AngularJS BootStrap 3 Modal Dialogs

A dialog/modal service written in AngularJS, creates predefined easy to use dialogs (error,wait,notify,confirm,create) with Angular UI and Bootstrap 3

A Pen by Michael E Conroy on CodePen.

License.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
function currencyFormat(n, lang) {
@carlesandres
carlesandres / 0_reuse_code.js
Created September 25, 2015 16:36
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console