Skip to content

Instantly share code, notes, and snippets.

mkdir -p ~/go/src/github.com/signalsciences
cd ~/go/src/github.com/signalsciences
git clone --branch CloudWAFInstances https://github.com/grokify/go-sigsci
git clone --branch CloudWAFInstances https://github.com/grokify/terraform-provider-sigsci
cd grokify/terraform-provider-sigsci
make
mkdir -p ~/.terraform.d/plugins/signalsciences/local/sigsci/0.5.1/linux_amd64
cp terraform-provider-sigsci ~/.terraform.d/plugins/signalsciences/local/sigsci/0.5.1/linux_amd64/terraform-provider-sigsci
rm .terraform.lock.hcl
mkdir -p ~/go/src/github.com/signalsciences/terraform-test
@grokify
grokify / main.tf
Created August 8, 2022 15:56
SigSci Terraform CloudWAF Fork Example
//terraform {
// required_providers {
// sigsci = {
// source = "signalsciences/sigsci"
// version = "0.4.2"
// }
// }
//}
// To build locally:
@grokify
grokify / 5-second-guide-to-creating-a-pull-request-for-openapi-generator-for-go.txt
Last active July 18, 2019 18:39
5 Second Guide to Creating a Pull Request for OpenAPI Generator for Go
$ bin/go-petstore.sh
$ mvn verify -f samples/client/petstore/go
$ mvn verify
$ git add *
$ git commit -m 'description of your PR'
$ bin/utils/ensure-up-to-date
$ git push origin go/client/<your-change>
@grokify
grokify / 5-second-guide-to-building-openapi-generator-for-go.txt
Last active July 21, 2018 17:13
5 Second Guide to Building OpenAPI Generator for Go
$ git clone https://github.com/<your-name>/openapi-generator
$ cd openapi-generator
$ git checkout -b go/client/<your-change>
$ vi <files-you-want-to-change>
$ mvn clean package -DskipTests
$ java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g go -i path/to/spec.(yaml|json) -o path/to/client -d packageName=myapi
@grokify
grokify / mvn-clean-install_command.txt
Last active June 14, 2018 15:49
OpenAPITools openapi-generator notes
$ cd /path/to/openapi-generator
$ mvn clean install
@grokify
grokify / file.go
Last active June 7, 2018 19:43
Multi-file Test Gist
package main
import(
"fmt"
)
func main() {
fmt.Println("DONE")
}
@grokify
grokify / post_attachment_example.json
Created August 26, 2017 05:01
Glip post attachment examples
{
"icon": "https://example.com/post_icon.png",
"title": "**Title of the post**",
"body": "Body of the post",
"attachments": [
{
"color": "#00ff2a",
"pretext": "Attachment pretext appears before the attachment block",
"author_name": "Author Name",
"author_link": "https://example.com/author_link",
@grokify
grokify / rc_mms_example_request.php
Created May 5, 2017 23:34
RingCentral MMS Example Request in PHP
$request = $rcsdk->createMultipartBuilder()
->setBody(array(
'from' => array('phoneNumber' => $smsNumber),
'to' => array(
array('phoneNumber' => $credentials['mobileNumber']),
),
))
->add(fopen('https://developers.ringcentral.com/assets/images/ico_case_crm.png', 'r'))
->request('/account/~/extension/~/sms');
@grokify
grokify / rc_mms_example_response.txt
Created May 5, 2017 23:26
RingCentral MMS Example Response
HTTP/1.1 200 OK
{
"uri" : "https.../restapi/v1.0/account/14542946004/extension/14542946004/message-store/10495240004",
"id" : 10495240004,
"to" : [ {
"phoneNumber" : "+14085505499",
"location" : "San Jose, West, CA"
} ],
"from" : {
@grokify
grokify / rc_mms_example_request.txt
Created May 5, 2017 23:25
RingCentral MMS Example Request
POST /restapi/v1.0/account/14542946004/extension/14542946004/sms HTTP/1.1
Content-Type: multipart/mixed; boundary=PLA_BOUNDARY_123456
Accept: application/json
--PLA_BOUNDARY_123456
Content-Disposition: form-data; name="json"
Content-Type: application/json
{