Skip to content

Instantly share code, notes, and snippets.

package main
import (
"fmt"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/rds"
"log"
"time"
)
package main
import (
"fmt"
"log"
"os"
"path/filepath"
"runtime"
"time"
)
@niski84
niski84 / gist:e1aa7174dc7eb52d33afab87d7e01e8e
Created March 4, 2023 03:08
SLACK get events in channel
package main
import (
"fmt"
"log"
"os"
"github.com/slack-go/slack"
)
@niski84
niski84 / gist:950acbefb12deebe4d57ccc8b713400d
Created March 4, 2023 02:47
windows create new golang project template
@echo off
setlocal enabledelayedexpansion
if "%~1"=="" (
set /p projectname="Please enter a project name: "
) else (
set projectname=%~1
)
package main
import (
"fmt"
"testing"
"github.com/aws/aws-sdk-go/aws/session"
)
func TestGetEBAppLogs(t *testing.T) {
package main
import (
"errors"
"fmt"
"os"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/elasticbeanstalk"
@niski84
niski84 / gist:2dbcc188823872f37c234b6db578a1d0
Last active March 2, 2023 07:08
switch windows focus and fullscreen app using best guess at window title
package main
import (
"flag"
"fmt"
"os"
"unsafe"
"github.com/AllenDang/w32"
)
@niski84
niski84 / gist:39745e0086efaca0102a105522994138
Created February 28, 2023 20:11
AWS ASG TimeBasedScaling
package awsapi
import (
"fmt"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/elasticbeanstalk"
)
@niski84
niski84 / gist:4c11df77247495e1a5ef8cbf0e5d3846
Created February 28, 2023 03:37
test cases for EB pause and resume
package awsapi
import (
"testing"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
)
func TestPauseEnvironment(t *testing.T) {
@niski84
niski84 / gist:4e6cf88300b6e4738ba868467dbe4b93
Created February 28, 2023 03:28
Nicholas Skitch, the The AWS Budget Bandit, Strikes Again! AWS Suspend and Resume ElasticBeanstalk EB
package main
import (
"fmt"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/elasticbeanstalk"
)