Skip to content

Instantly share code, notes, and snippets.

View chall3ng3r's full-sized avatar

Faisal Iqbal chall3ng3r

View GitHub Profile
@chall3ng3r
chall3ng3r / chall3ng3r.omp.json
Last active December 10, 2021 13:52
ohmyposh.dev - config
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"final_space": true,
"console_title": true,
"console_title_style": "template",
"console_title_template": "{{.User}}@{{.Host}} in {{ .Path }}",
"blocks": [
{
"type": "prompt",
"alignment": "left",
@chall3ng3r
chall3ng3r / DrawAngularLine-Arduino.cpp
Last active April 19, 2020 19:38
Rotate bitmap at runtime and draw on display
#define DEG2RAD 0.0174532925
void drawAngularLine(int x, int y, int length, int rotation)
{
float angleRadians = DEG2RAD * (rotation - 90);
float x1 = x + cos(angleRadians) * length;
float y1 = y + sin(angleRadians) * length;
display1.drawLine(x, y, x1, y1);
}

Keybase proof

I hereby claim:

  • I am chall3ng3r on github.
  • I am chall3ng3r (https://keybase.io/chall3ng3r) on keybase.
  • I have a public key whose fingerprint is 71D3 33EB 721B EB83 FC4E 6945 BCB0 3EA7 6F58 73B6

To claim this, I am signing this object:

@chall3ng3r
chall3ng3r / AudioFadeScript.cs
Created January 26, 2018 17:45
Audio Fade Script for Unity3D
public static class AudioFadeScript
{
public static IEnumerator FadeOut(AudioSource audioSource, float FadeTime)
{
float startVolume = audioSource.volume;
while (audioSource.volume > 0)
{
audioSource.volume -= startVolume * Time.deltaTime / FadeTime;