Skip to content

Instantly share code, notes, and snippets.

View xola139's full-sized avatar
🙂
always learning something

Raul Corona xola139

🙂
always learning something
View GitHub Profile
@xola139
xola139 / update attribute
Last active June 15, 2023 19:43
update attribut lastUpdate in null
db.getCollection("images").update(
{edad:{$gte:15}},
{$set: {lastUpdate: null}},
{
multi: true,
}
);
@xola139
xola139 / snippets MongoDB
Created June 15, 2023 18:20
Here I will put little snippetsrelataioned with querys MongoDB
/*
var array = {id :"item1", images:[{id:"img1",type:"fire"},{id:"img2",type:"fire"},{id:"img3",type:"water"},
{id:"img4",type:"whater"},{id:"img5",type:"fire"},{id:"img6",type:"land"}
]}
*/
db.getCollection("images").find({images: {$elemMatch: {type:'fire'}}})
@xola139
xola139 / ERROR Error: Cannot find a differ supporting object
Created March 19, 2020 18:19
Common Error For in Angular without initialze variable
ERROR Error: Cannot find a differ supporting object '[object Object]' of type 'object'. NgFor only supports binding to Iterables such as Arrays.
at NgForOf.ngDoCheck (common.js:4477)
at checkAndUpdateDirectiveInline (core.js:24506)
at checkAndUpdateNodeInline (core.js:35163)
at checkAndUpdateNode (core.js:35102)
at debugCheckAndUpdateNode (core.js:36124)
at debugCheckDirectivesFn (core.js:36067)
at Object.eval [as updateDirectives] (MyComponentComponent.html:46)
at Object.debugUpdateDirectives [as updateDirectives] (core.js:36055)
at checkAndUpdateView (core.js:35067)
@xola139
xola139 / gist:258e16d9030a17d0147fc0fd09f5ef79
Created March 11, 2020 05:07
solution HammerGestureConfig cannot be invoked
A temporary fix that works 100 for now :
in the file ngx-gallery.umd.js changes this lines of code :
var CustomHammerConfig = /** @Class */ (function (_super) {
__extends(CustomHammerConfig, _super);
function CustomHammerConfig() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.overrides = ({
'pinch': { enable: false },
'rotate': { enable: false }
@xola139
xola139 / HammerGestureConfig cannot be invoked
Created March 11, 2020 04:56
ERROR TypeError: Class constructor HammerGestureConfig cannot be invoked without 'new'
core.js:7187 ERROR TypeError: Class constructor HammerGestureConfig cannot be invoked without 'new'
at new CustomHammerConfig (ngx-gallery.umd.js:1898)
at _createClass (core.js:23184)
at _createProviderInstance (core.js:23151)
at resolveNgModuleDep (core.js:23098)
at _callFactory (core.js:23222)
at _createProviderInstance (core.js:23154)
at resolveNgModuleDep (core.js:23098)
at _createClass (core.js:23188)
at _createProviderInstance (core.js:23151)
var express = require("express");
var app = express();
app.use(express.static("dist"));
app.use((req,res)=>{
res.sendFile(path.join(__dirname, 'dist/index.html'));
});
var server = app.listen(8081, function(){
var port = server.address().port;
console.log("Server started at http://localhost:%s", port);
var express = require("express");
var app = express();
app.use(express.static(path.join(__dirname, 'dist')))
var server = app.listen(8081, function(){
var port = server.address().port;
console.log("Server started at http://localhost:%s", port);
});
@xola139
xola139 / TopicSecurity
Created March 26, 2019 16:52
TopicSecurity
SQL Injection
Cross Site Scripting
Integer Overflow
Bash Shellshock
Missing `httpOnly` Cookie Attribute
HTTP Debugging Methods (TRACE/TRACK) Enabled
SSL/TLS: Missing `secure` Cookie Attribute
X-Frame-Options Header Not Set
Application Error Disclosure
Tabla que muestran los caracteres comodín usados para crear los patrones y su significado, junto a un pequeño ejmplo de su utilización.
Significado Ejemplo Resultado
\ Marca de carácter especial /\$ftp/ Busca la palabra $ftp
^ Comienzo de una línea /^-/ Líneas que comienzan por -
$ Final de una línea /s$/ Líneas que terminan por s
. Cualquier carácter (menos salto de línea) /\b.\b/ Palabras de una sóla letra
| Indica opciones /(L|l|f|)ocal/ Busca Local, local, focal
( ) Agrupar caracteres /(vocal)/ Busca vocal
[ ] Conjunto de caracteres opcionales /escrib[aoe]/ Vale escriba, escribo, escribe
#Dado un arreglo de objetos ordertar por atributo especifico.
var arrefloItems = [
{
"h_id": "3",
"city": "Dallas",
"state": "TX",
"zip": "75201",
"price": "162500"