Skip to content

Instantly share code, notes, and snippets.

View cgrs's full-sized avatar
🥑

carlos gonzález cgrs

🥑
View GitHub Profile
{
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/master/schema.json",
"basics": {
"name": "Carlos González Recio",
"email": "hola@cgrs.me",
"image": "https://gravatar.com/avatar/db0cf308368f7455c169c28eaedaa30c?s=512",
"label": "CS Engineer",
"location": {
"countryCode": "ES",
"city": "Madrid",
@cgrs
cgrs / gitignore.sh
Last active February 12, 2019 13:02
[bash 4+] fill .gitignore with popular templates (from GitHub)
#!/bin/bash
function is_present () {
command -v "$1" &>/dev/null
}
if ! is_present curl; then
echo "curl not found"
exit 1
fi
@cgrs
cgrs / git-report.sh
Last active November 11, 2019 14:53
Create a commit report in a list of git repositories
#!/usr/bin/env bash
WORKDIR=${1:-`pwd`}
SINCE=${2:-"1970/01/01"}
UNTIL=${3:-`date +%Y/%m/%d`}
echo "Commits from ${SINCE} to ${UNTIL}"
for dir in ${WORKDIR}*/; do
pushd $dir &> /dev/null
if [ -d .git ]; then
repo=$(basename ${dir})

Keybase proof

I hereby claim:

  • I am cgrs on github.
  • I am cgrs (https://keybase.io/cgrs) on keybase.
  • I have a public key ASAS272fUoH2BqyTjLeu5W2cjjVNcsBisWzMuNoC_sezqQo

To claim this, I am signing this object:

@cgrs
cgrs / Dockerfile
Created June 19, 2017 15:39
MariaDB on Alpine Linux (armhf)
FROM alpine:armhf
RUN apk update && apk add --no-cache mariadb mariadb-client
ADD setup.sh /setup.sh
RUN chmod a+x /setup.sh && ./setup.sh && rm -f /setup.sh
ENTRYPOINT ["mysqld_safe"]
EXPOSE 3306
@cgrs
cgrs / randompaper.sh
Last active August 28, 2018 16:22
[bash] Random wallpaper from Unsplash Source
#!/usr/bin/env bash
# Random wallpaper from Unsplash Source
function setWallpaper {
local file=$1
if test -z $file; then
echo "Error: no file specified"
return 1
elif test -e $file; then
local uri=$(perl -MURI::file -e "print URI::file->new('${file}')")
@cgrs
cgrs / Makefile
Last active March 24, 2016 19:45
Makefile to compile every C file within a directory tree
CC = gcc
CFLAGS = -O2
SOURCES := $(shell find -name '*.c')
BINARIES := $(patsubst %.c,%,$(SOURCES))
default:
@echo "make what?"
.PHONY: clean