Skip to content

Instantly share code, notes, and snippets.

View DRFR0ST's full-sized avatar
🏡
Not on vacation

Mike Eling DRFR0ST

🏡
Not on vacation
View GitHub Profile
@DRFR0ST
DRFR0ST / COMMIT_CONVENTION.md
Created June 7, 2022 09:05
Commit convention

Commit convention

How to create commits

In our project, we create commits in an orderly way, using emoji for this and start the commit content with a capital letter. The commit body complements „this commit will...". For example: ":lipstick: Fix main container height"

List of emojis that we use

| Text | Image | GFM shortcode* | Windows 10 picker name | When to use it |

import React, { useContext, useRef } from 'react';
import { ImageStyle, TextStyle, useColorScheme, ViewStyle } from 'react-native';
import { Theme } from 'tint-n-tinge';
import { useSignal } from './hooks';
type PaletteRaw = {
primary: string;
background: string;
text: string;
};
REACT_APP_BASENAME=/
REACT_APP_FIREBASE_APIKEY=AIzaSyA_AUH-zsM6ecOoWFeEKdYRQ-w64nWz3zA
REACT_APP_FIREBASE_AUTHDOMAIN=ping-82fee.firebaseapp.com
REACT_APP_FIREBASE_DATABASEURL=https://ping-82fee.firebaseio.com
REACT_APP_FIREBASE_PROJECTID=ping-82fee
REACT_APP_FIREBASE_STORAGEBUCKET=ping-82fee.appspot.com
REACT_APP_FIREBASE_MESSAGINGSENDERID=262343699619
REACT_APP_FIREBASE_APPID=1:262343699619:web:9b197e44a89eb579376316
REACT_APP_FIREBASE_MEASUREMENTID=G-Q9S8PDHJDP
src
├── api
│ ├── auth.ts
│ ├── client.ts
│ ├── commands.ts
│ ├── fcm.ts
│ ├── hooks.ts
│ ├── messages.ts
│ └── utils.ts
├── assets
{"v":"5.2.1","fr":60,"ip":0,"op":600,"w":1920,"h":1080,"nm":"1c","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Shape Layer 67","parent":5,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[56.509,58.327,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[23.636,23.636,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0]],"o":[[0,0]],"v":[[1122,506]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.721568627451,0.721568627451,0.721568627451,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":8},"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0,0,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":true},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a"
@DRFR0ST
DRFR0ST / fleet.json
Last active September 26, 2020 22:35
macrents.pl fleet
[
{
"id": "skoda-rapid-01",
"available": true,
"visible": true,
"description": {
"de_DE": [
"Czujniki parkowania, kamera cofania, podrzewane fotele, zestaw głośnomówiący, SmartLink"
],
"en_US": [
Intel(R) HD Graphics 520
Report Date: Sunday, July 19, 2020
Report Time [hh:mm:ss]: 2:54:22 PM
Driver Version: 22.20.16.4785
Operating System: Windows* 10 Pro (10.0.19041)
Physical Memory: 16204 MB
@DRFR0ST
DRFR0ST / stadia_mobile.js
Created May 23, 2020 11:41
🕹️ Enable controller for Stadia on mobile devices. (In chrome browser)
javascript:gg = navigator.getGamepads; navigator.getGamepads = function(){ g = gg.apply(navigator); if (g[0] !== null) { g0 = {}; for(var property in g[0]){g0[property] = g[0][property]}; g0.mapping="standard"; return [g0, null, null, null]}; return g; }
@DRFR0ST
DRFR0ST / map.ts
Created May 22, 2020 23:04
FontAwesome 4.4 icon map with labels.
export const ICONS_LIST: IIconsList = [{"class":"fa-500px","label":"500px"},{"class":"fa-amazon","label":"amazon"},{"class":"fa-balance-scale","label":"balance-scale"},{"class":"fa-battery-0","label":"battery-0 (alias)"},{"class":"fa-battery-1","label":"battery-1 (alias)"},{"class":"fa-battery-2","label":"battery-2 (alias)"},{"class":"fa-battery-3","label":"battery-3 (alias)"},{"class":"fa-battery-4","label":"battery-4 (alias)"},{"class":"fa-battery-empty","label":"battery-empty"},{"class":"fa-battery-full","label":"battery-full"},{"class":"fa-battery-half","label":"battery-half"},{"class":"fa-battery-quarter","label":"battery-quarter"},{"class":"fa-battery-three-quarters","label":"battery-three-quarters"},{"class":"fa-black-tie","label":"black-tie"},{"class":"fa-calendar-check-o","label":"calendar-check-o"},{"class":"fa-calendar-minus-o","label":"calendar-minus-o"},{"class":"fa-calendar-plus-o","label":"calendar-plus-o"},{"class":"fa-calendar-times-o","label":"calendar-times-o"},{"class":"fa-cc-diners-club",
@DRFR0ST
DRFR0ST / useConnectivity.ts
Last active May 20, 2020 11:01
🎣 React Native hook for checking internet connection.
import { useRef, useState } from 'react';
import NetInfo from "@react-native-community/netinfo";
/**
* Returns information about internet connectivity.
* @example const [isConnected, checkConnection] = useConnectivity();
*/
export const useConnectivity = () => {
const [ isConnected, setConnected ] = useState<boolean | null>(null);
const ref = useRef<[ typeof isConnected, () => void ] | null>(null);