Skip to content

Instantly share code, notes, and snippets.

View moracarlos's full-sized avatar

Carlos Mora moracarlos

  • Panamá
View GitHub Profile
@moracarlos
moracarlos / payload-response.json
Created August 14, 2025 12:59
Payload Response Lambda
{
"isBase64Encoded": false,
"statusCode": 200,
"headers": { "headername": "headervalue" },
"multiValueHeaders": { "headername": ["headervalue", "headervalue2", ...], ... },
"body": "{}"
}
@moracarlos
moracarlos / payload-request.json
Created August 14, 2025 12:52
Payload API Gateway -> Lambda Request
{
"version":"2.0",
"routeKey":"GET /",
"rawPath":"/dev/",
"rawQueryString":"",
"headers":{
"accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
"accept-encoding":"gzip, deflate, br, zstd",
"accept-language":"en-US,en;q=0.9",
"content-length":"0",
require 'securerandom'
class AuthController < ApplicationController
skip_before_action :verify_authenticity_token
before_action :require_user_logged_in!, only: [ :logout]
before_action :user_logged_in!, only: [:login, :forgot]
def login
render layout: false
end
banesco-internacionales-prod
description: Desktop Computer
product: Virtual Machine
vendor: Microsoft Corporation
version: 7.0
serial: 0000-0002-0632-6631-0747-2135-78
width: 64 bits
capabilities: smbios-2.3 dmi-2.3 vsyscall32
configuration: boot=normal chassis=desktop uuid=C731A21C-1E29-0A4F-BCFC-81031DCB41FF
Description: Ubuntu 16.04.3 LTS
{
"title": "WC1",
"configuration": {
"widgets": {
"8ae59c22-45be-86d5-de96-8480476332f6": {
"isSystemType": true,
"bundleAlias": "charts",
"typeAlias": "basic_timeseries",
"type": "timeseries",
"title": "Timeseries - Flot",
<Files xmlrpc.php>
order deny,allow
deny from all
</Files>
#REWRITE WP-LOGIN.PHP#
#<IfModule mod_rewrite.c>
#RewriteEngine On
#RedirectMatch 301 /wp-login.php(.*) /$1
#RedirectMatch 301 /wp-admin(.*) /$1
url = 'http://banesco.com/wp-content/uploads/img.jpg'
if startsWith(url, 'http://banesco.com/') {
new_url = str_replace('http://banesco.com/', 'http://cdntest2014.cloudapp.net', url)
ajax_call(new_url)
}
if startsWith(url, 'http://bneco-adm-2015.cloudapp.net/') {
new_url = str_replace('http://bneco-adm-2015.cloudapp.net/', 'http://cdntest2014.cloudapp.net', url)
ajax_call(new_url)
@moracarlos
moracarlos / opencv-python-ipcam.py
Created August 3, 2016 03:02 — forked from thearn/opencv-python-ipcam.py
python-opencv ip camera example
import base64
import time
import urllib2
import cv2
import numpy as np
"""
Examples of objects for image frame aquisition from both IP and
###############################################################################
#
# Copyright (C) 2014, Tavendo GmbH and/or collaborators. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
app.use(function(req, res, next) {
res.header('Access-Control-Allow-Credentials', true);
res.header('Access-Control-Allow-Origin', req.headers.origin);
res.header('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE');
res.header('Access-Control-Allow-Headers', 'X-Requested-With, X-HTTP-Method-Override, Content-Type, Accept');
if ('OPTIONS' == req.method) {
res.send(200);
} else {
next();
}