Skip to content

Instantly share code, notes, and snippets.

@Dwyriel
Dwyriel / update_widevine.sh
Created December 10, 2022 07:24
Install/update widevine for chromium
#!/bin/bash
#A compact version of https://github.com/proprietary/chromium-widevine specialized for my own system and uses
if [ "$EUID" != 0 ]; then
sudo "$0" "$@"
exit $?
fi
#wherever you want, preferably where script is located
@Dwyriel
Dwyriel / nCharInput.c
Last active September 29, 2023 14:09
Read input of any length in C
char *inputString(FILE* fp, size_t chunk){
if(chunk < 1)
chunk = 1;
char *str;
int ch;
size_t len = 0;
str = realloc(NULL, sizeof(*str) * chunk);
if(!str)return str;
while(EOF!=(ch=fgetc(fp)) && ch != '\n'){
str[len++]=ch;
@Dwyriel
Dwyriel / .gitignore
Last active November 23, 2022 20:57
Generic Cmake & Qt .gitignore
# C++ objects and libs
*.slo
*.lo
*.o
*.a
*.la
*.lai
*.so
*.so.*
*.dll
@Dwyriel
Dwyriel / gistfire2.css
Last active April 23, 2021 17:43
Dynamic Row
<!-- copiar e colar o card para testar o exemplo -->
<ion-grid style="padding-top: 60px;">
<ion-row style="text-align: center; position: absolute;">
<ion-card class="cardWidth">
<ion-card-header>
<ion-card-subtitle>Card Subtitle</ion-card-subtitle>
<ion-card-title>Card Title</ion-card-title>
</ion-card-header>
<ion-card-content>