Skip to content

Instantly share code, notes, and snippets.

Avatar
😁

JaDoggx86 JaDogg

😁
View GitHub Profile
View semantic-commit-messages.md

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@JaDogg
JaDogg / latency.markdown
Created Jan 21, 2020 — forked from hellerbarde/latency.markdown
Latency numbers every programmer should know
View latency.markdown

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs
Read 1 MB sequentially from memory ..... 250,000 ns  = 250 µs
@JaDogg
JaDogg / sound_play_crossplatform.py
Created Jun 21, 2019 — forked from juancarlospaco/sound_play_crossplatform.py
Cross-platform Sound Playing with Standard Libs only, No Sound file is required, No install is required, Python2 / Python3.
View sound_play_crossplatform.py
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os, sys
from tempfile import gettempdir
from subprocess import call
def beep(waveform=(79, 45, 32, 50, 99, 113, 126, 127)):
View english-adjectives.txt
abandoned
able
absolute
adorable
adventurous
academic
acceptable
acclaimed
accomplished
accurate
View WebViewConfirm.java
import javafx.application.Application;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.SimpleBooleanProperty;
import javafx.event.*;
import javafx.scene.Node;
import javafx.scene.Scene;
import javafx.scene.control.*;
import javafx.scene.effect.BoxBlur;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.*;
View JavaFXImageConversion.java
import javafx.scene.image.Image;
import javax.imageio.ImageIO;
import java.awt.image.*;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
public Image getJavaFXImage(byte[] rawPixels, int width, int height) {
ByteArrayOutputStream out = new ByteArrayOutputStream();
try {
ImageIO.write((RenderedImage) createBufferedImage(rawPixels, width, height), "png", out);
@JaDogg
JaDogg / HTMLEditorCustomizationSample.java
Last active Oct 2, 2020 — forked from jewelsea/HTMLEditorCustomizationSample.java
Insert An Image On Caret Position JavaFX:HTMLEditor
View HTMLEditorCustomizationSample.java
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Node;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.ToolBar;
import javafx.scene.web.HTMLEditor;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
@JaDogg
JaDogg / HTMLEditorCustomizationSample.java
Last active Aug 29, 2015 — forked from jewelsea/HTMLEditorCustomizationSample.java
Sample Showing how to add an image to HTMLEditor
View HTMLEditorCustomizationSample.java
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.scene.Node;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.ToolBar;
import javafx.scene.web.HTMLEditor;
import javafx.stage.Stage;