Skip to content

Instantly share code, notes, and snippets.

View elkhayder's full-sized avatar

ZAKARIA EL KHAYDER elkhayder

View GitHub Profile
@borismus
borismus / gist:1032746
Created June 18, 2011 02:46
Convert a base64 string into a binary Uint8 Array
var BASE64_MARKER = ';base64,';
function convertDataURIToBinary(dataURI) {
var base64Index = dataURI.indexOf(BASE64_MARKER) + BASE64_MARKER.length;
var base64 = dataURI.substring(base64Index);
var raw = window.atob(base64);
var rawLength = raw.length;
var array = new Uint8Array(new ArrayBuffer(rawLength));
for(i = 0; i < rawLength; i++) {
int k;
double sin() ,cos();
main(){
float A=0, B=0, i, j, z[1760];
char b[1760];
printf("\x1b[2J");
for(; ; ) {
memset(b,32,1760);
memset(z,0,7040);
for(j=0; 6.28>j; j+=0.07) {
@rxaviers
rxaviers / gist:7360908
Last active July 4, 2024 13:59
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@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
@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
@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, ...)
@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 - - -
@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>

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"
@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==