Skip to content

Instantly share code, notes, and snippets.

View D-sense's full-sized avatar
🏠
Online

Adeshina H. D-sense

🏠
Online
View GitHub Profile
package main
import (
"log"
"time"
)
func main(){
input := 50
@D-sense
D-sense / curl.md
Created October 1, 2021 18:42 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@D-sense
D-sense / multiple_ssh_setting.md
Created June 8, 2021 16:23 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "[email protected]"
@D-sense
D-sense / ticket-raffling.go
Last active May 30, 2020 13:12
Ticket-Raffling
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"math/rand"
"os"
"time"
)
@D-sense
D-sense / traversal.go
Created April 11, 2020 14:26 — forked from denvaar/traversal.go
Depth and Breadth-first traversal in a binary tree, implemented in Golang
package main
import "fmt"
type node struct {
value string
left *node
right *node
}
@D-sense
D-sense / go-worker.go
Created February 17, 2020 17:05 — forked from System-Glitch/go-worker.go
A resilient service worker written in Go
package main
// This is an example of a resilient service worker program written in Go.
//
// This program will run a worker, wait 5 seconds, and run it again.
// It exits when SIGINT or SIGTERM is received, while ensuring any ongoing work
// is finished before exiting.
//
// Unexpected panics are also handled: program won't crash if the worker panics.
// However, panics in goroutines started by the worker won't be handled and have
@D-sense
D-sense / github-workflows-goreleaser.yml
Created November 23, 2019 08:42 — forked from markbates/github-workflows-goreleaser.yml
Run Go tests in Windows, Mac, Linux. Go version 1.12/1.13 both with Modules and GOPATH.
name: Release
on:
release:
types:
- published
jobs:
release:
name: Release
runs-on: ubuntu-latest
@D-sense
D-sense / .travis.yml
Created October 3, 2019 14:21 — forked from ryboe/.travis.yml
Example .travis.yml for Golang
# use the latest ubuntu environment (18.04) available on travis
dist: xenial
language: go
# Force-enable Go modules. Also force go to use the code in vendor/
# These will both be unnecessary when Go 1.13 lands.
env:
- GO111MODULE=on
- GOFLAGS='-mod vendor'
Widget build(BuildContext context) {
final mBloc = BlocProvider.mReportsBloc(context);
final fBloc = BlocProvider.fReportsBloc(context);
return DefaultTabController(
length: 2,
child: Scaffold(
appBar: AppBar(
elevation: 1.5,
bottom: TabBar(
@D-sense
D-sense / values_pointers.go
Created February 11, 2019 14:37 — forked from josephspurrier/values_pointers.go
Golang - Asterisk and Ampersand Cheatsheet
/*
********************************************************************************
Golang - Asterisk and Ampersand Cheatsheet
********************************************************************************
Also available at: https://play.golang.org/p/lNpnS9j1ma
Allowed:
--------
p := Person{"Steve", 28} stores the value