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 prereqs() { | |
switch (undefined) { | |
// Just add another empty case to the list for each thing you require | |
case Modernizr.getusermedia: | |
case Modernizr.flexbox: | |
return false; | |
break; | |
default: | |
return true; | |
} |
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
WARNING: Committing the active transaction to Committing the active transaction to create the new type 'NpmUser' as subclass of 'V'. The transaction will be reopen right after that. To avoid this behavior create the classes outside the transaction. To avoid this behavior do it outside the transaction |
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
diff --git a/bin/console.sh b/bin/console.sh | |
index a7f9f67..8868058 100755 | |
--- a/bin/console.sh | |
+++ b/bin/console.sh | |
@@ -3,27 +3,9 @@ | |
# Copyright (c) 1999-2010 Luca Garulli | |
# | |
-#set current working directory | |
-cd `dirname $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
CREATE OR REPLACE FUNCTION json_array_elements_text(arr json) RETURNS SETOF text AS $$ | |
BEGIN | |
RETURN QUERY SELECT arr->>i | |
FROM generate_series(0,json_array_length(arr)-1) i; | |
END | |
$$ LANGUAGE plpgsql; |
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
=================== =========== ================================== | |
Explanation Keyword Value | |
=================== =========== ================================== | |
Field alignment format unaligned, aligned, html, or latex | |
Field separator fieldsep separator | |
One field per line expanded | |
Rows only tuples_only | |
Row separator recordsep separator | |
Table title title title | |
Table border border 0, 1, or 2 |
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
import Data.List | |
import Data.Char (isDigit) | |
import Text.ParserCombinators.Parsec | |
-- The basic datatype of the language | |
data Datum = DInt Integer | |
| DString String | |
| DFloat Double | |
| DBool Bool | |
| DList [Datum] deriving (Eq) |
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
python3 -m http.server | |
# '.' is now served on port 8000 |
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
(defn pg-json-to-string [thing] | |
(.setType thing "java.lang.String") ;; "Pretend you are a string" | |
(.getValue thing)) ;; Now we can actually get the value |
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
(defn wrap-http-params [handler] | |
(fn [request] | |
(let [query-params (request :query-params) | |
form-params (request :form-params)] | |
(let [http-params (merge {} query-params form-params)] | |
(handler (assoc request :http-params http-params)))))) | |
(defn wrap-keyword-http-params [handler] | |
(fn [request] | |
(letfn [(kwify [req kw] |
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
ppa::repo { 'chris-lea/node.js': | |
ensure => present, | |
apt_key => "C7917B12", | |
} -> Exec["apt-get update"] | |
ppa::repo { 'cassou/emacs': | |
ensure => present, | |
apt_key => "CEC45805", | |
} -> Exec["apt-get update"] |