Skip to content

Instantly share code, notes, and snippets.

@ArturoCruzT
ArturoCruzT / app.css
Created August 21, 2017 15:59
CSS General Gelita
.nolborder {
padding-left: 1px;
padding-right: 1px;
}
.cien {
width: 100%;
}
.extra-color {
@Cacodaimon
Cacodaimon / SumByKey.js
Created November 4, 2013 21:12
A simple AngularJS filter for summarizing the values of an array containing objects by a key.
angular.module('caco.feed.filter', [])
.filter('sumByKey', function() {
return function(data, key) {
if (typeof(data) === 'undefined' || typeof(key) === 'undefined') {
return 0;
}
var sum = 0;
for (var i = data.length - 1; i >= 0; i--) {
sum += parseInt(data[i][key]);
@csanz
csanz / encrypt_decrypt.js
Created August 30, 2011 16:06
Simple String Encryption & Decryption with Node.js
function encrypt(text){
var cipher = crypto.createCipher('aes-256-cbc','d6F3Efeq')
var crypted = cipher.update(text,'utf8','hex')
crypted += cipher.final('hex');
return crypted;
}
function decrypt(text){
var decipher = crypto.createDecipher('aes-256-cbc','d6F3Efeq')
var dec = decipher.update(text,'hex','utf8')