Skip to content

Instantly share code, notes, and snippets.

View gregtzar's full-sized avatar
⚔️

Gregory Tzar gregtzar

⚔️
View GitHub Profile
@gregtzar
gregtzar / query.sql
Last active August 1, 2018 10:34 — forked from ramiroaznar/query.sql
How to find duplicate values with PostgreSQL
select * from tablename t1
where (select count(*) from tablename t2
where t1.fieldname = t2.fieldname) > 1
order by fieldname
@gregtzar
gregtzar / main.go
Last active August 29, 2015 14:16 — forked from gdey/README.md
package main
import (
"fmt"
"log"
"net/http"
"net/url"
"os"
"os/signal"
"strings"
'use strict';
/**
* ui-ladda
*
* To use, simply use normal Ladda classes and attributes and pass a model to ui-ladda. You can
* use truthy or falsey values, or pass decimals from 0 to 1 to show the progress bar animation.
*
*
* @param uiLadda (mixed): Sets wether or not to show the ladda loading
//take this script and place it in your firebug or javascript console (when you are on the invoice edit page)
//it will segment billable and non-billable (0.00) and total them up (could be improved to group by rate)
var total=0;
function add_them(index, e){
var num = parseFloat($(e).val());
if (!isNaN(num)) {
total += num;
}
}
<?php
/**
* Github WebHook processor
* POST to: postreceive.php?key=REPLACE_ME_WITH_A_UNIQUE_KEY
*
* @author Luis Abreu
* @version 0.1
* @copyright Quodis, 24 February, 2011
* @package default