Skip to content

Instantly share code, notes, and snippets.

View chase2981's full-sized avatar

Chase Gibbons chase2981

View GitHub Profile
/*
Solution of: https://www.codewars.com/kata/545434090294935e7d0010ab
*/
var query = function() {
var self = {};
var tables = [];
var selector = null;
@chase2981
chase2981 / gist:94ab619a59cf031703b2888a9d4098b1
Created March 30, 2020 04:59 — forked from CrookedNumber/gist:8964442
git: Removing the last commit

Removing the last commit

To remove the last commit from git, you can simply run git reset --hard HEAD^ If you are removing multiple commits from the top, you can run git reset --hard HEAD~2 to remove the last two commits. You can increase the number to remove even more commits.

If you want to "uncommit" the commits, but keep the changes around for reworking, remove the "--hard": git reset HEAD^ which will evict the commits from the branch and from the index, but leave the working tree around.

If you want to save the commits on a new branch name, then run git branch newbranchname before doing the git reset.

@chase2981
chase2981 / SupervisorTaskCanvasComponent.tsx
Created April 5, 2020 05:27
Twilio Flex MessagingCanvas Examples
import * as React from "react";
import {
Manager, Actions, MessagingCanvas, MessagingCanvasContext, DynamicComponent, ContextProvider, MessageList, StateHelper, TaskHelper, ITask,
Supervisor,
TaskChannelDefinition,
TaskContextProps,
Theme
} from '@twilio/flex-ui';
import CoreApiService from '../Shared/CoreApiService';
import { Channel } from 'twilio-chat/lib/channel';
@chase2981
chase2981 / wifiscanner.py
Created November 4, 2020 04:23 — forked from dropmeaword/wifiscanner.py
A simple python script which records and logs wifi probe requests.
#########################################################################
# Wifiscanner.py - A simple python script which records and logs wifi probe requests.
# Author - D4rKP01s0n
# Requirements - Scapy and Datetime
# Inspiration - Tim Tomes (LaNMaSteR53)'s WUDS https://bitbucket.org/LaNMaSteR53/wuds/
# Reminder - Change mon0 (around line 65) to your monitor-mode enabled wifi interface
#########################################################################
from datetime import datetime
{
"Africa/Abidjan": "+00:00",
"Africa/Accra": "+00:00",
"Africa/Addis_Ababa": "+03:00",
"Africa/Algiers": "+01:00",
"Africa/Asmara": "+03:00",
"Africa/Asmera": "+03:00",
"Africa/Bamako": "+00:00",
"Africa/Bangui": "+01:00",
"Africa/Banjul": "+00:00",
@chase2981
chase2981 / README.md
Last active December 7, 2020 01:39
RD Flex Style Guide Issues To Be Voted On

RD Flex Style Guide Issues To Be Voted On

Feel free to add to this as you see fit and make suggestions, I think anyone can commit to this gist if I'm not mistaken, or at very least quote it and comment on it.

This is still a work-in-progress. I plan to provide brief pros/cons foreach item in the final variation, as well as organize things a little better into common sections.

Right now I'm thinking we will just vote on these issues using a plain old google form, that way I know we will be able to reference the results within our documentation, but even our voting mechanism is up for debate at this point.

@chase2981
chase2981 / rdBaseTaskRouterTaskAttributes.js
Last active February 9, 2021 23:16
Omnichannel Task Router Base Attributes
// task
// snake case
var taskJson = {
// this shows up in flex on the task as the primary text
"name": "chase@rentdynamics.com",
// differentiates between different task queues based on acceptable response times
"type": "short-lived",
"rd": {
// contactCenter -- we might not need this tbh -- especially if we do different flex projects or even different workspaces or workflows per contact center
"contact_center_id":1,
// task
// snake case
var taskJson = {
// this shows up in flex on the task as the primary text
"name": "(435) 999-5175",
// this is needed cuz there's no good way to access it on a task basis within the workflow expressions
"channelType": "chat",
// differentiates between different task queues based on acceptable response times
"type": "short-lived",
// this means it's an important task
@chase2981
chase2981 / docusaurus-copy-button.md
Created February 26, 2021 02:54 — forked from yangshun/docusaurus-copy-button.md
How to add the "Copy" button to code blocks in Docusaurus

Adding "Copy" (to Clipboard) Button

If you would like to add a button to your fenced code blocks so that users may copy the code, you can do so in Docusaurus. You will have to add some code to your Docusaurus project, as seen below.

Under static/js, create a file called code-block-buttons.js with the following:

// Turn off ESLint for this file because it's sent down to users as-is.
/* eslint-disable */
window.addEventListener('load', function() {
@chase2981
chase2981 / rxjs-diagrams.md
Created April 13, 2021 18:44 — forked from PCreations/rxjs-diagrams.md
Super Intuitive Interactive Diagrams to learn combining RxJS sequences by Max NgWizard K