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
#!/bin/bash | |
# | |
# Linter Elixir files using Credo. | |
# Called by "git receive-pack" with arguments: refname sha1-old sha1-new | |
# | |
# Config | |
# ------ | |
# credo.terminate | |
# The credo exit status level to be considered as “not passed”—to prevent | |
# git commit until fixed. |
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
SELECT ROUND(AVG(a.posts)) "Posts (avg)", post_hour | |
FROM ( | |
SELECT count(id) posts, DATE(post_date) dateonly, EXTRACT(hour FROM post_date) post_hour | |
FROM message | |
GROUP BY post_hour, dateonly | |
) a | |
GROUP BY post_hour | |
ORDER BY post_hour; |
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 | |
// Password generator function | |
function passwordGen($num, $length, $inclBigLetters = true, $inclSmallLetters = true, $inclNumbers = true, $inclSpecialChars = false) { | |
$bigLetters = array("A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"); | |
$smallLetters = array("a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"); | |
$numbers = array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9); | |
$specialChars = array("$", "_", "+", "-", "/", "*", "=", "(", ")"); | |
$result = array(); | |
$characterSet = array(); |
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
<div class="blog"> | |
<header> | |
<h1>{{blog_title}}</h1> | |
</header> | |
{{#articles}} | |
<article class="blog-article"> | |
<header><h2>{{title}}</h2></header> | |
<section class="blog-body"> | |
{{{body}}} |