Skip to content

Instantly share code, notes, and snippets.

View ricardogarfe's full-sized avatar
enjoy

Ricardo García Fernández ricardogarfe

enjoy
View GitHub Profile
@genyrosk
genyrosk / Makefile
Last active February 8, 2024 18:26
Makefile for a Python environment with pyenv-virtualenv
SHELL:=/bin/bash
PROJECT=project
VERSION=3.7.4
VENV=${PROJECT}-${VERSION}
VENV_DIR=$(shell pyenv root)/versions/${VENV}
PYTHON=${VENV_DIR}/bin/python
JUPYTER_ENV_NAME=${VENV}
JUPYTER_PORT=8888
## Make sure you have `pyenv` and `pyenv-virtualenv` installed beforehand
@joncalhoun
joncalhoun / ..README.md
Last active May 30, 2023 05:29
Most of my settings for a new mac

Chrome

  • Download & install Chrome
  • Login & sync settings/whatever else

Mac OS settings

  • General -> Use dark menu bar
  • General -> Default web browser: Google Chrome
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active May 6, 2024 07:52
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

#!groovy
import groovy.json.JsonOutput
import java.util.Optional
import hudson.tasks.test.AbstractTestResultAction
import hudson.model.Actionable
import hudson.tasks.junit.CaseResult
def speedUp = '--configure-on-demand --daemon --parallel'
def nebulaReleaseScope = (env.GIT_BRANCH == 'origin/master') ? '' : "-Prelease.scope=patch"
@jonico
jonico / Jenkinsfile
Last active January 31, 2024 09:43
Example for a full blown Jenkins pipeline script with CodeQL analysis steps, multiple stages, Kubernetes templates, shared volumes, input steps, injected credentials, heroku deploy, sonarqube and artifactory integration, Docker containers, multiple Git commit statuses, PR merge vs branch build detection, REST API calls to GitHub deployment API, …
#!groovy
import groovy.json.JsonOutput
import groovy.json.JsonSlurper
def label = "mypod-${UUID.randomUUID().toString()}"
podTemplate(label: label, yaml: """
spec:
containers:
- name: mvn
image: maven:3.3.9-jdk-8
@ricardogarfe
ricardogarfe / git-move-commits-to-a-branch.md
Last active October 14, 2019 11:37
Move git commmits to a new branch

Move commmits between branches

From this:

master A - B - C - D - E

Move C - D - E to a new branch:

@Jaza
Jaza / Private-pypi-howto
Last active July 2, 2023 16:24
Guide for how to create a (minimal) private PyPI repo, just using Apache with directory autoindex, and pip with an extra index URL.
*
@rinze
rinze / build_dataset.py
Last active January 15, 2019 10:51
Parser para los archivos .DAT del Ministerio del Interior y el archivo de códigos de municipios del INE y código en R para gráficas simples.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import csv
import codecs
import cStringIO
import os
from collections import namedtuple
def getParties(parties_file):
@staltz
staltz / introrx.md
Last active May 6, 2024 01:44
The introduction to Reactive Programming you've been missing
@thestonefox
thestonefox / thestonefox-vimrc
Last active May 29, 2019 07:02
Basic .vimrc with pathogen, solarized theme, nerdtree
execute pathogen#infect()
syntax on
set number
set expandtab
set tabstop=2
set background=dark
set t_Co=256
let g:solarized_termcolors=256
let g:solarized_termtrans=1