Skip to content

Instantly share code, notes, and snippets.

View kcemenike's full-sized avatar
💭
thinking of the next problem to solve 😁

Kelechi EMENIKE kcemenike

💭
thinking of the next problem to solve 😁
View GitHub Profile
@kcemenike
kcemenike / slackDeclutter.py
Created March 5, 2022 10:23
slackDeclutter
from slack_sdk import WebClient
from datetime import datetime, timedelta, timezone
# from IPython.display import clear_output
import time, pytz, re
USER_TOKEN = "xoxp-....." # Enter your user token here
PERIOD_AGO = 1 # How many hours/minutes/seconds 'ago' do you want to delete?
CHANNEL_NAME = 'upwork-jobs' # Change this to your channel name
SLEEP_TIME = 5 # Set this up with any number you wish, to prevent API throttling
@kcemenike
kcemenike / appReducerV2.js
Created March 16, 2021 13:55
Udacity React Nanodegree appReducer using switch/case/default
/* Create A Reducer
*
* You need to create a reducer called "appReducer" that accepts two arguments:
* - First, an array containing information about ice cream
* - Second, an object with a 'DELETE_FLAVOR' `type` key
* (i.e., the object contains information to delete the flavor from the state)
*
* The action your reducer will receive will look like this:
* { type: 'DELETE_FLAVOR', flavor: 'Vanilla' }
*
@kcemenike
kcemenike / appReducerV1.js
Created March 16, 2021 13:53
Udacity React Nanodegree appReducer.js
/* Create A Reducer
*
* You need to create a reducer called "appReducer" that accepts two arguments:
* - First, an array containing information about ice cream
* - Second, an object with a 'DELETE_FLAVOR' `type` key
* (i.e., the object contains information to delete the flavor from the state)
*
* The action your reducer will receive will look like this:
* { type: 'DELETE_FLAVOR', flavor: 'Vanilla' }
*