Skip to content

Instantly share code, notes, and snippets.

View javierguzman's full-sized avatar
🙂
Happy Coding

Francisco Javier Guzmán Jiménez javierguzman

🙂
Happy Coding
View GitHub Profile
@javierguzman
javierguzman / pactl-list-short-output-1.txt
Created September 14, 2020 05:46
Output of pactl list short
0 module-device-restore
1 module-stream-restore
2 module-card-restore
3 module-augment-properties
4 module-switch-on-port-available
5 module-switch-on-connect
6 module-udev-detect
7 module-alsa-card device_id="0" name="pci-0000_01_00.1" card_name="alsa_card.pci-0000_01_00.1" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes avoid_resampling=no card_properties="module-udev-detect.discovered=1"
8 module-alsa-card device_id="1" name="pci-0000_00_1f.3-platform-skl_hda_dsp_generic" card_name="alsa_card.pci-0000_00_1f.3-platform-skl_hda_dsp_generic" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes avoid_resampling=no card_properties="module-udev-detect.discovered=1"
9 module-bluetooth-policy
@javierguzman
javierguzman / TermsAndConditions.tsx
Created July 19, 2020 13:40
Example of terms and conditions in different languages using markdown and dynamic import
import React, { useEffect, useState } from 'react';
import i18next from 'i18next';
import { getCurrentLanguage } from '@Utils/language';
import ReactMarkdown from 'react-markdown';
import Loader from '@Loader';
type MarkdownContent = string | undefined;
const TermsAndConditions = (): JSX.Element => {
const currentLanguage = getCurrentLanguage(i18next.languages); // it returns i18next.languages[0] -> 'es', 'fr', 'en' etc.
const [getTermsAndConditions, setTermsAndConditions] = useState<MarkdownContent>(undefined);
@javierguzman
javierguzman / porting.cpp
Created March 6, 2020 14:46
Porting Scenarios
// Scenario 1 -> default behavior keeps changing:
// TODAY
#if defined(PORTING_X)
useMemory1()
#else
useMemory2()
#endif
//TOMORROW
#if defined(PORTING_X)