Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Micah Silverman dogeared

🏠
Working from home
Block or report user

Report or block dogeared

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@dogeared
dogeared / SpringBoot15Application.java
Last active Mar 2, 2019
spring boot 1.5.x with spring security 4 vs. spring boot 2.1.3 with spring security 5
View SpringBoot15Application.java
@EnableOAuth2Sso
@RestController
@SpringBootApplication
public class OAuth2DemoApplication_1_5 {
@Value("#{ @environment['security.oauth2.resource.server'] }")
private String resourceServerUrl;
private OAuth2ProtectedResourceDetails resource;
@dogeared
dogeared / README.md
Last active Jan 10, 2019 — forked from mraible/application.yml
Get an ID Token from Okta with Spring Boot
View README.md

To Run:

OKTA_OAUTH2_ISSUER=https://{yourOktaDomain}/oauth2/default \
OKTA_OAUTH2_CLIENT-ID={clientId} \
OKTA_OAUTH2_CLIENT-SECRET={clientSecret} \
spring run idtoken.groovy
@dogeared
dogeared / SlackController.java
Created May 24, 2017
application/x-www-form-urlencoded to POJO like a boss - HandlerMethodArgumentResolver approach
View SlackController.java
@RestController
@RequestMapping("/api/v1")
public class SlackController {
private static final Logger log = LoggerFactory.getLogger(SlackController.class);
@RequestMapping(
value = "/slack", method = RequestMethod.POST,
consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE, produces = MediaType.APPLICATION_JSON_VALUE
)
@dogeared
dogeared / AbstractFormSlackSlashCommand.java
Last active May 22, 2017
application/x-www-form-urlencoded to POJO like a boss - Abstract super class approach
View AbstractFormSlackSlashCommand.java
// workaround for customize x-www-form-urlencoded
public abstract class AbstractFormSlackSlashCommand {
// eww - breaks java code convetion, but doesn't require any additional configuration
public void setTeam_id(String teamId) {
setTeamId(teamId);
}
public void setTeam_domain(String teamDomain) {
setTeamDomain(teamDomain);
@dogeared
dogeared / SlackController.java
Last active Apr 3, 2019
application/x-www-form-urlencoded to POJO like a boss - HttpMessageConverter approach
View SlackController.java
@RestController
@RequestMapping("/api/v1")
public class SlackController {
private static final Logger log = LoggerFactory.getLogger(SlackController.class);
@RequestMapping(
value = "/slack", method = RequestMethod.POST,
consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE, produces = MediaType.APPLICATION_JSON_VALUE
)
@dogeared
dogeared / fake_test.sh
Created May 11, 2017
Jealous of your friends' internet speed? Just fake it!
View fake_test.sh
#! /bin/bash
# Based on https://www.unknowncheats.me/forum/php/98463-speedtest-real-fake-results-photoshop.html
## httpie (httpie.org - a modern curl replacement) and md5 are required
DOWN="999925"
UP="999794"
PING=1
SERVER=3729
@dogeared
dogeared / 00_README
Last active Feb 2, 2019 — forked from lmarkus/README.MD
Extracting / Exporting custom emoji from Slack
View 00_README
This builds off the excellent work of @lmarkus.
The scripts below can be used in conjunction with the Slack Emoji Tools Google Chrome extension to export emojis from
one Slack team and import into another team.
Original work here: https://gist.github.com/lmarkus/8722f56baf8c47045621
View keybase.md

Keybase proof

I hereby claim:

  • I am dogeared on github.
  • I am afitnerd (https://keybase.io/afitnerd) on keybase.
  • I have a public key whose fingerprint is F1F1 6F30 807A 1D37 66CF 5771 2BCE AE15 9FAC E6B4

To claim this, I am signing this object:

View gist:7372408
<!doctype html>
<html>
<head>
<title></title>
<style>
body {
background: white;
text-align: center;
padding: 20px;
font-family: Georgia, serif;
@dogeared
dogeared / PRAssigned.rb
Last active Dec 15, 2015
Show who's assigned to which pull NOTE: you may have to install the json gem if you don't already have it. sudo gem install json
View PRAssigned.rb
#! /usr/bin/ruby
#
require 'rubygems'
require 'json'
require 'open-uri'
user = 'YOUR GITHUB USERNAME'
pass = 'YOUR GITHUB PASSWORD'
repo = 'workmarket/application'
You can’t perform that action at this time.