Skip to content

Instantly share code, notes, and snippets.

View percybolmer's full-sized avatar

ProgrammingPercy percybolmer

View GitHub Profile
{
"envelope_id":"61b1699c-c2af-47fa-ba05-e1bfc5a0bb3b",
"payload":{
"token":"2Ns65jvtOBULYISLdEdinjyg",
"team_id":"T02B0KKSX4Z",
"api_app_id":"A02BBLA9PEU",
"event":{
"client_msg_id":"e64f8121-a4e0-45a9-8f10-670f229bf242",
"type":"app_mention",
"text":"<@U02AN8BG2E7>",
package main
import (
"context"
"fmt"
"log"
"os"
"time"
"github.com/joho/godotenv"
socketmode: 2021/08/10 08:37:50 socket_mode_managed_conn.go:91: WebSocket connection succeeded on try 0
socketmode: 2021/08/10 08:37:50 socket_mode_managed_conn.go:439: Starting to receive message
socketmode: 2021/08/10 08:37:50 socket_mode_managed_conn.go:481: Incoming WebSocket message: {
"type": "hello",
"num_connections": 1,
"debug_info": {
"host": "applink-canary-5467cdc868-2w5t7",
"build_number": 18,
"approximate_connection_time": 18060
},
package main
import (
"fmt"
"log"
"os"
"time"
"github.com/joho/godotenv"
"github.com/slack-go/slack"
SLACK_AUTH_TOKEN="Your Bot Token"
SLACK_APP_TOKEN="App Level token"
SLACK_CHANNEL_ID="ChannelID"
package main
import (
"fmt"
"os"
"time"
"github.com/joho/godotenv"
"github.com/slack-go/slack"
)
SLACK_AUTH_TOKEN="YourTokenGoesHere"
SLACK_CHANNEL_ID="YourSlackChannelID"
import { NavLink , useHistory} from "react-router-dom";
function Navbar() {
let history = useHistory();
function goHome(path) {
history.push("/");
}
import { useParams, useLocation } from "react-router-dom";
import React from 'react';
const Profile = () => {
// Use the useParams hook to get the username from the URL
// username has to be applied as a named parameter in the route
let { username } = useParams();
// useLocation hook is used to grab the state from the input to object
// You can grab each field in the object by using the same name as the variable name
import { NavLink } from "react-router-dom";
function Navbar() {
return (
<div className="navbar">
<h1>Navbar</h1>
<ul>
<li><NavLink exact to="/">Home</NavLink></li>
<li><NavLink to="/contact">Contact</NavLink></li>
<li><NavLink to="/about">About</NavLink></li>