Skip to content

Instantly share code, notes, and snippets.

View dsalcedo's full-sized avatar
🐳
Backend

J. Daniel Salcedo Sambrano dsalcedo

🐳
Backend
  • Backapp
  • Mexico
View GitHub Profile
@dsalcedo
dsalcedo / encrypt_file_pkcs5_pkcs7.go
Created December 2, 2019 17:59 — forked from huyinghuan/encrypt_file_pkcs5_pkcs7.go
golang encrypt with pkcs5 and pkcs7
package main
import (
"bytes"
"crypto/aes"
"crypto/cipher"
"crypto/rand"
"errors"
"io"
"io/ioutil"
@dsalcedo
dsalcedo / DOSpacesStorageServiceProvider.php
Created April 17, 2019 20:57 — forked from m2sh/DOSpacesStorageServiceProvider.php
How To Use Digitalocean Spaces as Laravel Cloud filesystems
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Aws\S3\S3Client;
use League\Flysystem\AwsS3v3\AwsS3Adapter;
use League\Flysystem\Filesystem;
use Storage;
@dsalcedo
dsalcedo / fintech_api_list.md
Created March 11, 2019 21:01 — forked from diegozr1/fintech_api_list.md
Curated list of Mexican API's with resources for fintech apps

Mexican Fintech APIs

This is a list of APIs you can use to build or power your app with fintech innovation in Mexico.

Bank Account information

@dsalcedo
dsalcedo / Envoy.blade.php.md
Created March 5, 2019 19:16 — forked from nasirkhan/Envoy.blade.php.md
Deploying with Envoy

SSH Keys

SSH keys provide a more secure way of logging into a virtual private server with SSH than using a password alone. While a password can eventually be cracked with a brute force attack, SSH keys are nearly impossible to decipher by brute force alone. Generating a key pair provides you with two long string of characters: a public and a private key. You can place the public key on any server, and then unlock it by connecting to it with a client that already has the private key. When the two match up, the system unlocks without the need for a password. You can increase security even more by protecting the private key with a passphrase.

https://www.digitalocean.com/community/tutorials/how-to-set-up-ssh-keys--2

Step One—Create the RSA Key Pair

The first step is to create the key pair on the client machine (there is a good chance that this will just be your computer):

@dsalcedo
dsalcedo / lambda-helloWorld.php
Created March 4, 2019 16:40 — forked from robinvdvleuten/lambda-helloWorld.php
Invoke sample Lambda function through PHP
<?php
require_once __DIR__.'/vendor/autoload.php';
use Aws\Lambda\LambdaClient;
$client = LambdaClient::factory([
'version' => 'latest',
// The region where you have created your Lambda
'region' => 'eu-west-1',
package main
import (
"bufio"
"log"
"os"
)
var concurrency = 100
@dsalcedo
dsalcedo / challenge-response.php
Created June 19, 2018 23:16 — forked from jcipriano/challenge-response.php
PHP example for generating challenge response for Twitter webhooks
<?php
// Example app consumer secret found in apps.twitter.com
const APP_CONSUMER_SECRET = 'z3ZX4v7mAAUGykl3EcmkqbartmuW8VFOOzCloLx9Q45P0hLrFu';
// Example token provided by incoming GET request
$token = $_GET['crc_token'];
/**
* Creates a HMAC SHA-256 hash created from the app TOKEN and
* your app Consumer Secret.
* @param token the token provided by the incoming GET request
@dsalcedo
dsalcedo / challenge-response.php
Created June 19, 2018 23:16 — forked from jcipriano/challenge-response.php
PHP example for generating challenge response for Twitter webhooks
<?php
// Example app consumer secret found in apps.twitter.com
const APP_CONSUMER_SECRET = 'z3ZX4v7mAAUGykl3EcmkqbartmuW8VFOOzCloLx9Q45P0hLrFu';
// Example token provided by incoming GET request
$token = $_GET['crc_token'];
/**
* Creates a HMAC SHA-256 hash created from the app TOKEN and
* your app Consumer Secret.
* @param token the token provided by the incoming GET request