This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"errors" | |
"strings" | |
"github.com/aws/aws-lambda-go/events" | |
"github.com/aws/aws-lambda-go/lambda" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
// http://play.golang.org/p/jZ5pa944O1 <- will not display the colors | |
import "fmt" | |
const ( | |
InfoColor = "\033[1;34m%s\033[0m" | |
NoticeColor = "\033[1;36m%s\033[0m" | |
WarningColor = "\033[1;33m%s\033[0m" | |
ErrorColor = "\033[1;31m%s\033[0m" | |
DebugColor = "\033[0;36m%s\033[0m" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Sample code used to generate a cryptographic key pair via an AWS Lambda function. | |
// (C) 2019 Nabla Zero Labs | |
// MIT License | |
package main | |
import ( | |
"crypto/rand" | |
"crypto/rsa" | |
"crypto/x509" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# build docker image on github actions and push to AWS ECR | |
name: Build | |
on: [push] | |
jobs: | |
run: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript | |
Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div class="btn-classic"> | |
oid | |
</div> | |
</template> | |
<script> | |
export default { | |
name: "Click" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Services; | |
use PhpAmqpLib\Connection\AMQPStreamConnection; | |
use PhpAmqpLib\Message\AMQPMessage; | |
class Rabbitmq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .docker/echo/Dockerfile | |
FROM node:erbium-alpine3.10 | |
RUN npm install -g laravel-echo-server | |
RUN mkdir -p /var/www | |
WORKDIR /var/www | |
EXPOSE 6001 | |
RUN ls /var/www | |
ENTRYPOINT laravel-echo-server start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"variables": { | |
"do_api_token": "*******" | |
}, | |
"builders": [ | |
{ | |
"type": "digitalocean", | |
"api_token": "{{user `do_api_token`}}", | |
"image": "ubuntu-20-04-x64", | |
"region": "nyc3", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$items = []; | |
foreach ($products as $value) { | |
$items[] = [ | |
'product_id' => $value->id, | |
'name' => $value->name, | |
]; | |
} | |
return collect($items)->all(); |