Skip to content

Instantly share code, notes, and snippets.

View DrBrad's full-sized avatar
💭
Learning Rust

Brad DrBrad

💭
Learning Rust
View GitHub Profile
@p3t3r67x0
p3t3r67x0 / pseudo_elements.md
Last active January 16, 2024 01:17
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] {
@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" />
@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));
@marcoarment
marcoarment / apns_jwt_token.php
Last active April 14, 2024 06:49
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');
@CHSuworatrai
CHSuworatrai / VMware vSphere 6.x Licence Keys
Created April 8, 2021 09:20 — forked from DVSB/VMware vSphere 6.x Licence Keys
VMware vSphere 6 and 7 Licence Keys
VMware vSphere 6 Enterprise Plus
1C20K-4Z214-H84U1-T92EP-92838
1A2JU-DEH12-48460-CT956-AC84D
MC28R-4L006-484D1-VV8NK-C7R58
5C6TK-4C39J-48E00-PH0XH-828Q4
4A4X0-69HE3-M8548-6L1QK-1Y240
VMware vSphere with Operations Management 6 Enterprise
4Y2NU-4Z301-085C8-M18EP-2K8M8
1Y48R-0EJEK-084R0-GK9XM-23R52
@yukirii
yukirii / hpe_sos_ubuntu.md
Last active June 19, 2024 21:49
installing HPE StoreOpen Software for RHELx64 to Ubuntu 20.04.2 LTS (Reference: https://rabbit-note.com/2020/01/12/ubuntu-ltfs/)