Skip to content

Instantly share code, notes, and snippets.

View elkhayder's full-sized avatar

ZAKARIA EL KHAYDER elkhayder

View GitHub Profile
using namespace System.Management.Automation
using namespace System.Management.Automation.Language
if ($host.Name -eq 'ConsoleHost')
{
Import-Module PSReadLine
}
#Import-Module PSColors
#Import-Module posh-git
Import-Module -Name Terminal-Icons
{
"final_space": true,
"console_title": true,
"console_title_style": "folder",
"blocks": [
{
"type": "prompt",
"alignment": "left",
"horizontal_offset": 0,
"vertical_offset": 0,
@elkhayder
elkhayder / Favicon.js
Last active October 28, 2020 01:12
Auto detect browser theme for custom favicons
const icon = document.createElement('link');
icon.setAttribute('rel', 'icon');
icon.setAttribute('type', 'image/png');
iconLink = (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) ? "favicon-white.png" : "favicon-black.png";
icon.setAttribute('href', iconLink);
document.head.appendChild(icon);
@Shibe
Shibe / lichess_knight.js
Last active May 1, 2020 22:18
April fools knight for Lichess
// ==UserScript==
// @name Use the april fools knight, as knight on the board.
// @namespace http://tampermonkey.net/
// @version 0.1
// @description improves rating by 1000
// @author Shibe
// @match https://lichess.org/*
// @grant none
// ==/UserScript==

Converting Tailwind UI Alpine transitions to Vue transitions

After you copy a component from the Tailwind UI library and begin to adapt it from Vue JS to Alpine JS .. you may wonder what to do about the transitions. As I'm exploring this myself, I am documenting it for others in the same boat.

Things to be aware of:

  • Alpine calls the beginning and ending states "start" & "end"
  • Vue calls the beginning and ending states "from" and "to"
  • Alpine has inline "directives" ie x-transition:enter="classes"
  • Vue has a wrapper component that applies classes to the child
  • Alpine applies the classes you pass it for each state, :enter-start="class"
@mouselangelo
mouselangelo / avd-hardware-profile-huawei-mate-20x.xml
Created July 23, 2019 10:51
Android: Basic AVD Hardware profile for the Huawei Mate 20 X phone
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<d:devices xmlns:d="http://schemas.android.com/sdk/devices/3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<d:device>
<d:name>HUAWEI Mate 20 X</d:name>
<d:manufacturer>HUAWEI</d:manufacturer>
<d:meta/>
<d:hardware>
<d:screen>
<d:screen-size>large</d:screen-size>
<d:diagonal-length>7.20</d:diagonal-length>
@sidneys
sidneys / youtube_format_code_itag_list.md
Created January 20, 2018 11:12
YouTube video stream format codes itags

YouTube video stream format codes

Comprehensive list of YouTube format code itags

itag Code Container Content Resolution Bitrate Range VR / 3D
5 flv audio/video 240p - - -
6 flv audio/video 270p - - -
17 3gp audio/video 144p - - -
18 mp4 audio/video 360p - - -
22 mp4 audio/video 720p - - -
@Moutard3
Moutard3 / mp3-upload-direct-link.md
Last active June 26, 2024 04:32
Tutorials / Walkthrough for uploading & getting direct link of sound file (mp3, ogg, ...)
@dmnsgn
dmnsgn / WebGL-WebGPU-frameworks-libraries.md
Last active July 3, 2024 18:09
A collection of WebGL and WebGPU frameworks and libraries

A non-exhaustive list of WebGL and WebGPU frameworks and libraries. It is mostly for learning purposes as some of the libraries listed are wip/outdated/not maintained anymore.

Engines and libraries ⚙️

Name Stars Last Commit Description
three.js ![GitHub
@ChaunceyHoover
ChaunceyHoover / frequencies.h
Last active October 2, 2022 17:36
A simple note-to-frequency header file, aimed for those who like to play with Window.h's `Beep` function. Also includes a Note-to-Millisecond macro for those aiming to make some moonbase-alpha tier music.
#ifndef HEADER_FREQUENCY_H
#define HEADER_FREQUENCY_H
// Taken from http://www.phy.mtu.edu/~suits/notefreqs.html
// Rounded to nearest number
// Format: <note><octave>(sharp/flat)
// Ex: C5S = C# note in 5th octave
#define C0 16
#define C0S 17
#define D0F C0S