- https://github.com/CodingGarden/twitch-team-shoutout-bot/
- TBD - link to samwisegardener bot code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
postsByTag: function (eleventyConfig) { | |
let _ = require("lodash"); | |
eleventyConfig.addCollection("postsByTag", function(collection) { | |
// Get unique list of tags | |
let tagSet = new Set(); | |
collection.getAllSorted().map(function(item) { | |
if( "tags" in item.data ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.acme; | |
import com.microsoft.sqlserver.jdbc.SQLServerDriver; | |
import org.flywaydb.core.Flyway; | |
import org.hibernate.boot.MetadataSources; | |
import org.hibernate.boot.registry.StandardServiceRegistryBuilder; | |
import org.hibernate.tool.hbm2ddl.SchemaUpdate; | |
import org.hibernate.tool.schema.TargetType; | |
import org.reflections.Reflections; | |
import org.springframework.jdbc.datasource.SimpleDriverDataSource; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict" | |
function progress(strs, current, total) { | |
let str = `${strs[0]}${current}${strs[1]}${total}${strs[2]}` | |
let ratio = Math.min(Math.max(current / total, 0), 1) | |
let length = Math.floor(ratio * str.length) | |
let pattern = new RegExp(`^.{${length}}`) | |
return str.replace(pattern, "\x1b[4m$&\x1b[0m") | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import io.dropwizard.Application; | |
import io.dropwizard.Configuration; | |
import io.dropwizard.client.JerseyClientBuilder; | |
import io.dropwizard.setup.Environment; | |
import io.dropwizard.testing.junit.DropwizardAppRule; | |
import org.assertj.core.data.MapEntry; | |
import org.eclipse.jetty.servlets.CrossOriginFilter; | |
import org.junit.ClassRule; | |
import org.junit.Test; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Class definition ommitted */ | |
public void run(){ | |
List<Integer> list = Arrays.asList(5, 9, -1, 60, 10, 2, 9); | |
// region <lambdas> ---------------------------------------------------------------------------┐ | |
list.sort ((a, b) -> b - a); | |
list.forEach(i -> System.out.print(i + " ")); // output: 60 10 9 9 5 2 -1 | |
// ┌-----------> Note the empty parenthesis, this lambda has no input |
The attachment extension is now located here: https://github.com/glennblock/extensions/blob/master/attachment.md
To view the progress of a Powerpoint presentation, a progress bar can be displayed at the bottom of the slide show.
Once the slideshow is complete, go to Tools > Macro > Visual Basic Editor.
In the new window, select Insert > Module and copy this text in the blank page:
Sub AddProgressBar()
On Error Resume Next
Hi there!
The docker cheat sheet has moved to a Github project under https://github.com/wsargent/docker-cheat-sheet.
Please click on the link above to go to the cheat sheet.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void removeJsonProcessingExceptionMapper(Environment environment) { | |
Set<Object> singletons = environment.getJerseyResourceConfig().getSingletons(); | |
List<Object> singletonsToRemove = Lists.newArrayList(); | |
for (Object s : singletons) { | |
if (JsonProcessingExceptionMapper.class.isAssignableFrom(s.getClass())) { | |
singletonsToRemove.add(s); | |
} | |
} | |
for (Object s : singletonsToRemove) { | |
singletons.remove(s); |
NewerOlder