Skip to content

Instantly share code, notes, and snippets.

View DrBrad's full-sized avatar
🐙
DNS

Brad DrBrad

🐙
DNS
View GitHub Profile
@yukirii
yukirii / hpe_sos_ubuntu.md
Last active November 4, 2025 00:52
installing HPE StoreOpen Software for RHELx64 to Ubuntu 20.04.2 LTS (Reference: https://rabbit-note.com/2020/01/12/ubuntu-ltfs/)
@marcoarment
marcoarment / apns_jwt_token.php
Last active June 18, 2025 14:36
Generate ES256 JWT tokens for Apple Push Notification Service (APNS) in PHP
<?php
function base64url_encode($binary_data) { return strtr(rtrim(base64_encode($binary_data), '='), '+/', '-_'); }
function apns_jwt_token($team_id, $key_id, $private_key_pem_str)
{
if (! function_exists('openssl_get_md_methods') || ! in_array('sha256', openssl_get_md_methods())) throw new Exception('Requires openssl with sha256 support');
$private_key = openssl_pkey_get_private($private_key_pem_str);
if (! $private_key) throw new Exception('Cannot decode private key');
@atechcrew
atechcrew / HammingCode.java
Created July 9, 2018 20:50
Hamming Code in java. Error detection hamming code using java. Java code to detect error hamming code.
import java.util.Arrays;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
public class HammingCode {
public static void main(String agrs[]){
String data1 = "1001101";
String data[] = data1.split("");
String arr[] = calculateRdundancyBitValue(arrangeData(data), getNumbOfRedundancyBits(data.length));
@DrBrad
DrBrad / Add_to_Files.java
Last active September 8, 2022 02:06
Android Media WebView Notifications
//-------- add this to webview ----------
wv.setWebChromeClient(new webChromeClient());
wv.addJavascriptInterface(new JSInterface(), "JSOUT");
//----- add this to manifest under </activity> -----
<receiver android:name=".NotificationPausePlay" />
@p3t3r67x0
p3t3r67x0 / pseudo_elements.md
Last active June 18, 2026 15:52
A CSS pseudo-element is used to style specified parts of an element. In some cases you can style native HTML controls with vendor specific pseudo-elements. Here you will find an list of cross browser specific pseudo-element selectors.

Styling native elements

Native HTML controls are a challenge to style. You can style any element in the web platform that uses Shadow DOM with a pseudo element ::pseudo-element or the /deep/ path selector.

video::webkit-media-controls-timeline {
  background-color: lime;
}

video /deep/ input[type=range] {