Skip to content

Instantly share code, notes, and snippets.

View felipealfonsog's full-sized avatar
🧳
Working from home

Felipe Alfonso González felipealfonsog

🧳
Working from home
View GitHub Profile
@felipealfonsog
felipealfonsog / apache_and_php.md
Created July 24, 2024 06:15 — forked from superjojo140/apache_and_php.md
Apache, PHP, MariaDB and PhpMyAdmin on Archlinux

Guide to install a LAMP system on on your archlinux system and serve php-based database applications.
LAMP stands for a Linux system with Apache (webserver), MariaDB (database) and PHP (programming language). In this guide we will also install PhpMyAdmin (database admin GUI) to easily manage the SQL tables.

Apache

apache logo

The Apache HTTP Server is an open-source and free product of the Apache Software Foundation and one of the most widely used web servers on the Internet. In addition to factors such as performance, expandability, security, freedom from license costs and support from a very large community, its long-term availability for a wide variety of operating systems is one of the reasons for its widespread use; it is most frequently used as a LAMP system.

Install packages

@felipealfonsog
felipealfonsog / Configuration for .gitconfig
Last active January 4, 2022 11:04 — forked from pksunkara/config
The git ~/.gitconfig & .gitconfig - Fix the problem of How can I save username and password in Git Unix//Mac
[user]
name = Pavan Kumar Sunkara
email = [email protected]
username = pksunkara
[core]
editor = nvim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
pager = delta
[sendemail]
smtpencryption = tls
@felipealfonsog
felipealfonsog / gpg_fix.txt
Created December 30, 2021 20:27 — forked from cezaraugusto/gpg_fix.txt
fixing `gpg failed to sign data` error on macOS
For troubleshooting, two things to first try:
run `git config --global gpg.program gpg2`, to make sure git uses gpg2 and not gpg
run `echo "test" | gpg2 --clearsign`, to make sure gpg2 itself is working
If that all looks all right, one next thing to try:
run `brew install pinentry` to ensure you have a good tool installed for passphrase entry
If after that install and you re-try git commit and still get the "failed to sign the data" error:
run `gpgconf --kill gpg-agent` to kill any running agent that might be hung
@felipealfonsog
felipealfonsog / Samba Config
Last active April 8, 2024 08:46 — forked from sytkov/smb.conf
/etc/samba/smb.conf
# Quick general config
min protocol = SMB2
vfs objects = catia fruit streams_xattr
fruit:aapl = yes
fruit:metadata = stream
fruit:model = Macintosh
fruit:posix_rename = yes
fruit:veto_appledouble = no
fruit:wipe_intentionally_left_blank_rfork = yes
#!/bin/env sh
lines=$(tput lines)
cols=$(tput cols)
awkscript='
{
letters="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#$%^&*()"
lines=$1
@felipealfonsog
felipealfonsog / gomatrix
Created July 16, 2021 00:44 — forked from dhaiducek/gomatrix
Modified Matrix Effect (original from @khakimov)
#!/bin/bash
lines=$(tput lines)
cols=$(tput cols)
awkscript='
{
lines=$1
random_col=$3
letter=$4
@felipealfonsog
felipealfonsog / eq.preset
Created August 9, 2018 23:59 — forked from kra3/eq.preset
Audacious presets: ~/.config/audacious/eq.preset
[Presets]
Preset0=Classical
Preset1=Club
Preset2=Dance
Preset3=Flat
Preset4=Live
Preset5=Laptop Speakers/Headphone
Preset6=Rock
Preset7=Pop
@felipealfonsog
felipealfonsog / polymer-metadata-stats.js
Created January 16, 2018 23:35 — forked from TimvdLippe/polymer-metadata-stats.js
Script to obtain stats from Polymer metadata
window.counts = {}
for (const condition of [
'computed trigger.rootProperty equals name',
'computed trigger.rootProperty is name until first dot',
'computed arg.value is empty',
'computed arg.literal is false',
'computed arg.structured is false',
'computed info.methodInfo equals compute effect name',
'computed trigger.wildcard is false',
'computed trigger.literal is false',
@felipealfonsog
felipealfonsog / promises_reduce.js
Created December 2, 2017 05:35 — forked from anvk/promises_reduce.js
Sequential execution of Promises using reduce()
function asyncFunc(e) {
return new Promise((resolve, reject) => {
setTimeout(() => resolve(e), e * 1000);
});
}
const arr = [1, 2, 3];
let final = [];
function workMyCollection(arr) {
@felipealfonsog
felipealfonsog / Matrix_Effect.sh
Last active March 18, 2024 11:39 — forked from khakimov/gist:3558086
Matrix Effect in you terminal
echo -e "\e[1;40m" ; clear ; while :; do echo $LINES $COLUMNS $(( $RANDOM % $COLUMNS)) $(( $RANDOM % 72 )) ;sleep 0.05; done|awk '{ letters="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#$%^&*()"; c=$4; letter=substr(letters,c,1);a[$3]=0;for (x in a) {o=a[x];a[x]=a[x]+1; printf "\033[%s;%sH\033[2;32m%s",o,x,letter; printf "\033[%s;%sH\033[1;37m%s\033[0;0H",a[x],x,letter;if (a[x] >= $1) { a[x]=0; } }}'