This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Helper class. | |
* | |
* This class provides some static methods that are helpful with | |
* postgres like manually manipulating sequences and dropping | |
* tables cascaded. | |
* | |
* It also provides the ability to create a batch insert (COPY) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Generate datetime with timezone support and microsend precision. | |
* | |
* Example: | |
* ``` | |
* $now = Datetime::now(); // generates YYYY-MM-DDTHH:MM:SS.MMMMMM | |
* ``` | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
----------------------------------------------------------------- | |
-- PostgreSQL | |
-- | |
SELECT last_value, is_called | |
FROM :sequence | |
-- If is_called is false, last_value is 1 and the next ID also 1. | |
-- If is_called is true, the next ID is last_value + 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en" ng-app> | |
<head> | |
<meta charset="utf-8"> | |
<title>Page Title</title> | |
<!-- Bootstrap --> | |
<link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet"> | |
<!-- FontAwsome --> | |
<link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Enumeration base class. | |
* | |
* Clients can implement this to create commonly used enum | |
* structs with the use of CONSTs. | |
* | |
* Example: | |
* <pre> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Given an Object it returns its length. | |
* Much like returning the size of an | |
* associative array. | |
* | |
* Usage: | |
* ```js | |
* var size = Object.size(myObject); | |
* ``` | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($) { | |
$(document).on('click', 'a[data-method]', function(e) { | |
e.preventDefault(); | |
var $this = $(this), | |
action = $this.attr('href'), | |
method = $this.data('method') | |
; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set PGPASSWORD=password psql --host=host --username=username --command="drop schema public cascade;create schema public;" database |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Copyright 2014 John Fragkoulis | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
À A | |
Á A | |
 A | |
à A | |
Ä A | |
Å A | |
Æ A | |
à a | |
á a | |
â a |