Skip to content

Instantly share code, notes, and snippets.

View Yannick243's full-sized avatar
🏠
Working from home

Yannick nsenga Yannick243

🏠
Working from home
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
export const b64toBlob = (dataURI) => {
const byteString = atob(dataURI.split(',')[1])
const ab = new ArrayBuffer(byteString.length)
const ia = new Uint8Array(ab)
for (let i = 0; i < byteString.length; i++) {
ia[i] = byteString.charCodeAt(i)
}
return new Blob([ab], { type: 'image/jpeg' })
}
@Yannick243
Yannick243 / user_aliases.cmd
Last active October 13, 2023 17:20
Cmder laravel aliases
;= @echo off
;= rem Call DOSKEY and use this file as the macrofile
;= %SystemRoot%\system32\doskey /listsize=1000 /macrofile=%0%
;= rem In batch mode, jump to the end of the file
;= goto:eof
;= Add aliases below here
e.=explorer .
gl=git log --oneline --all --graph --decorate $*
ls=ls --show-control-chars -F --color $*
pwd=cd
@Yannick243
Yannick243 / .htaccess
Created February 15, 2019 12:40
Rewrite laravel app to https
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
RewriteEngine On
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
@Yannick243
Yannick243 / Math.php
Created May 4, 2017 06:12 — forked from jgrossi/Math.php
Math class from Taylor Otwell. Thanks to @brad ([email protected]) for the class content.
<?php
class Math {
/**
* The base.
*
* @var string
*/
private static $base = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';