Skip to content

Instantly share code, notes, and snippets.

View IEnoobong's full-sized avatar

Enoobong Ime Ibanga IEnoobong

View GitHub Profile
@corneil
corneil / build-modified-modules.sh
Last active January 19, 2023 11:10
Determine changed modules in multi-module Maven Project in GitHub Actions
#!/bin/bash
function itemInModules() {
local e
for e in ${MODULES}; do
if [[ "$e" == "$ITEM" ]]; then
echo "1"
return 0
fi
done
echo "0"
@keithjgrant
keithjgrant / abp-twitter.txt
Last active August 31, 2023 20:48
Adblock plus filters to remove the crap from twitter
twitter.com##.module.trends
twitter.com##.wtf-module
twitter.com##[data-component-context="suggest_activity_tweet"]
twitter.com##.nav>.moments
twitter.com##.LiveVideoHomePageModuleContainer
@luqmanoop
luqmanoop / MainActivity.java
Last active September 13, 2020 21:53
Android Exoplayer demo activity
import android.annotation.SuppressLint;
import android.net.Uri;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import com.google.android.exoplayer2.DefaultLoadControl;
import com.google.android.exoplayer2.DefaultRenderersFactory;
import com.google.android.exoplayer2.ExoPlayerFactory;
import com.google.android.exoplayer2.SimpleExoPlayer;
@dogeared
dogeared / SlackController.java
Last active May 31, 2022 12:34
application/x-www-form-urlencoded to POJO like a boss - HttpMessageConverter approach
@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
)
@todvora
todvora / some_links.md
Created February 20, 2016 17:33 — forked from rponte/some_links.md
Some interesting articles about JPA/Hibernate Multi-Tenancy
@pcan
pcan / SelfExpiringHashMap.java
Last active July 4, 2024 23:51
SelfExpiringHashMap - a Java Map which entries expire automatically after a given time; it uses a DelayQueue internally.
/*
* Copyright (c) 2019 Pierantonio Cangianiello
*
* MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
@daniellevass
daniellevass / android_material_design_colours.xml
Last active June 5, 2024 13:54
Android Material Design Colours
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- google's material design colours from
http://www.google.com/design/spec/style/color.html#color-ui-color-palette -->
<!--reds-->
<color name="md_red_50">#FFEBEE</color>
<color name="md_red_100">#FFCDD2</color>
<color name="md_red_200">#EF9A9A</color>
@mortezaadi
mortezaadi / persistence.xml
Last active July 23, 2024 00:45
persistence xml configurations for major databases and jpa providers
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
version="1.0">
<!-- derby -->