Skip to content

Instantly share code, notes, and snippets.

View Bradleykingz's full-sized avatar
🤖
On the grind

Bradley K. Ochola Bradleykingz

🤖
On the grind
View GitHub Profile
@Bradleykingz
Bradleykingz / DummyFilter,java
Created April 2, 2018 07:48
Edit ServletResponse body inside ZuulFilter
package com.dummy.dummydata.filter;
import com.dummy.dummydata.pojo.*;
import com.google.gson.Gson;
import com.netflix.servo.jsr166e.ThreadLocalRandom;
import com.netflix.zuul.ZuulFilter;
import com.netflix.zuul.context.RequestContext;
import org.springframework.stereotype.Component;
import org.springframework.util.StreamUtils;
@Bradleykingz
Bradleykingz / SimpleErrorController.java
Created April 4, 2018 20:25
Removing Whitelabel Page in Spring 2.0
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.web.servlet.error.AbstractErrorController;
import org.springframework.boot.autoconfigure.web.servlet.error.ErrorViewResolver;
import org.springframework.boot.web.servlet.error.ErrorAttributes;
import org.springframework.boot.web.servlet.error.ErrorController;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@Bradleykingz
Bradleykingz / logo.svg
Created November 28, 2018 07:14
SVG Logo
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Bradleykingz
Bradleykingz / animals.txt
Last active September 9, 2023 18:41 — forked from atduskgreg/animals.txt
Alphabetized, removed all occurrences of 'list'
Aardvark
Aardwolf
African Buffalo
African Elephant
African Leopard
Albatross
Alligator
Alpaca
Alpaca
American Buffalo (bison)
@Bradleykingz
Bradleykingz / README.md
Created January 8, 2020 09:18 — forked from michellechandra/README.md
Basic US State Map - D3
<!DOCTYPE html>
<head>
<style>
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
flex-direction: column;
}
@Bradleykingz
Bradleykingz / code.md
Created January 10, 2020 04:17 — forked from gopalindians/code.md
Jetbrains IntelliJ IDEA 2019.2.4 Activation code

Please make fork of this, as this can be removed by Github.com sooner or later.

CATF44LT7C-eyJsaWNlbnNlSWQiOiJDQVRGNDRMVDdDIiwibGljZW5zZWVOYW1lIjoiVmxhZGlzbGF2IEtvdmFsZW5rbyIsImFzc2lnbmVlTmFtZSI6IiIsImFzc2lnbmVlRW1haWwiOiIiLCJsaWNlbnNlUmVzdHJpY3Rpb24iOiJGb3IgZWR1Y2F0aW9uYWwgdXNlIG9ubHkiLCJjaGVja0NvbmN1cnJlbnRVc2UiOmZhbHNlLCJwcm9kdWN0cyI6W3siY29kZSI6IklJIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA4In0seyJjb2RlIjoiQUMiLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJEUE4iLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJQUyIsInBhaWRVcFRvIjoiMjAyMC0wMS0wOCJ9LHsiY29kZSI6IkdPIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA4In0seyJjb2RlIjoiRE0iLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJDTCIsInBhaWRVcFRvIjoiMjAyMC0wMS0wOCJ9LHsiY29kZSI6IlJTMCIsInBhaWRVcFRvIjoiMjAyMC0wMS0wOCJ9LHsiY29kZSI6IlJDIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA4In0seyJjb2RlIjoiUkQiLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJQQyIsInBhaWRVcFRvIjoiMjAyMC0wMS0wOCJ9LHsiY29kZSI6IlJNIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA4In0seyJjb2RlIjoiV1MiLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJEQiIsI

@Bradleykingz
Bradleykingz / .block
Created January 29, 2020 13:35
fresh block
license: mit
<!DOCTYPE html>
<head>
<link href="https://fonts.googleapis.com/css?family=Open+Sans&display=swap" rel="stylesheet">
<style>
body {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
const fetchMachine = Machine({
id: 'fetch',
initial: 'incomplete',
context: {
retries: 0
},
states: {
incomplete: {
on: {
COMPLETE_ORDER: 'pendingPayment'