Skip to content

Instantly share code, notes, and snippets.

@aboma
aboma / ember.select2.js
Last active February 7, 2021 17:07
select2.js enabled select box view for ember.js
// Select box utilizing Select2 functionality that overrides Ember.Select;
// Define view in the same way that you would an Ember.Select view.
// Additional attributes supported are: width, allowClear, and closeOnSelect;
// Example view:
// {{ view App.Select2
// viewName="fieldValueSelect2"
// prompt="Please select a value list"
// contentBinding="controller.fieldValuesLists"
// optionLabelPath="content.name"
// optionValuePath="content.id"
@plentz
plentz / nginx.conf
Last active April 24, 2024 11:15
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@korczis
korczis / deferredRequest.js
Last active August 22, 2017 20:05
Deferred wrapper of cherio request
var deferred = require('deferred'),
request = require('request'),
cheerio = require('cheerio');
var deferredRequest = function(url) {
var d = deferred();
request(url, function (err, resp, body) {
if(err) {
d.reject(new Error("Unable to fetch '" + url + "', reason: " + err));