MD5: 59bab8f71f8c096cd3f72cd73851515d
Rename it to: Sublime Text
Make it executable with: chmod u+x Sublime\ Text
/** | |
* converted stringify() to jQuery plugin. | |
* serializes a simple object to a JSON formatted string. | |
* Note: stringify() is different from jQuery.serialize() which URLEncodes form elements | |
* UPDATES: | |
* Added a fix to skip over Object.prototype members added by the prototype.js library | |
* USAGE: | |
* jQuery.ajax({ |
#OS junk files | |
[Tt]humbs.db | |
*.DS_Store | |
#Visual Studio files | |
*.[Oo]bj | |
*.user | |
*.aps | |
*.pch | |
*.vspscc |
#macro(VelListToJSON $list ) | |
#set($myList = $list )## dereference | |
{ | |
#foreach($key in $myList.keySet()) | |
"$key": | |
#set($x = $myList.get($key)) | |
#VelToJSON($x) | |
#if($foreachCount != $myList.keySet().size()) , #end | |
#end | |
} |
/// <summary> | |
/// Extension method that turns a dictionary of string and object to an ExpandoObject | |
/// </summary> | |
public static ExpandoObject ToExpando(this IDictionary<string, object> dictionary) | |
{ | |
var expando = new ExpandoObject(); | |
var expandoDic = (IDictionary<string, object>)expando; | |
// go through the items in the dictionary and copy over the key value pairs) | |
foreach (var kvp in dictionary) |
/*jslint onevar: false, plusplus: false */ | |
/* | |
JS Beautifier | |
--------------- | |
Written by Einar Lielmanis, <einar@jsbeautifier.org> | |
http://jsbeautifier.org/ |
(function () { | |
var apply = Function.prototype.apply; | |
var flatten = apply.bind(Array.prototype.concat, []); | |
Array.prototype.selectMany = function (fn) { | |
return flatten(this.map(fn)); | |
}; | |
}()); | |
// usage |
<!DOCTYPE HTML> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Bootstrap Basic Template</title> | |
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"> | |
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css"> | |
<link rel="stylesheet" href="style.css"> |
Magic words:
psql -U postgres
Some interesting flags (to see all, use -h
or --help
depending on your psql version):
-E
: will describe the underlaying queries of the \
commands (cool for learning!)-l
: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)// Without line 9 hack, linting the file throws: 5:4 error should is defined but never used no-unused-vars | |
'use strict'; | |
var debug = require('debug')('test:myModel'); | |
var should = require('should'); | |
var security = require('../models/myModel'); | |
before((done) => { | |
should; //bypass ESLint no-unused-var error | |
done(); |