Skip to content

Instantly share code, notes, and snippets.

View alejoar's full-sized avatar

Alejo Arias alejoar

  • ScopeTwo.com
  • Madrid, Spain
View GitHub Profile
@excenter
excenter / rune.bash
Created November 30, 2018 04:35
Mojave pyenv update
export VERSION="3.7.1"
xcode-select --install
brew update
brew upgrade
brew install zlib
brew reinstall zlib
export LDFLAGS="-L/usr/local/opt/zlib/lib"
export CPPFLAGS="-I/usr/local/opt/zlib/include"
pyenv install $VERSION
pyenv global $VERSION
@Globegitter
Globegitter / nginx-latest.sh
Last active May 7, 2022 18:19
Install the latest nginx from source for Ubuntu 14.04
# Automatically instal the latest nginx
wget -O - http://nginx.org/keys/nginx_signing.key | sudo apt-key add -
#Make a backup copy of your current sources.list file
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
#Now copy the following repositories to the end of ` /etc/apt/sources.list`
echo "deb http://nginx.org/packages/mainline/ubuntu/ trusty nginx" | sudo tee -a /etc/apt/sources.list
echo "deb-src http://nginx.org/packages/mainline/ubuntu/ trusty nginx" | sudo tee -a /etc/apt/sources.list
@fisadev
fisadev / work
Created December 3, 2015 14:57
A python script to launch my tmux things at once
#!/usr/bin/env python
# coding: utf-8
from os import system
PROJECT_PATH = 'path_to_your_project'
ACTIVATE_VENV = '. path_to_your_virtualenv/bin/activate'
def tmux(command):
@programus
programus / alacritty.yml
Last active February 13, 2024 22:14
pull down from top alacritty (like iTerm2)
window:
# Window dimensions (changes require restart)
#
# Number of lines/columns (not pixels) in the terminal. The number of columns
# must be at least `2`, while using a value of `0` for columns and lines will
# fall back to the window manager's recommended size.
dimensions:
columns: 500
lines: 30
@ajaegers
ajaegers / git-move-files-in-subfolder.md
Last active February 17, 2024 13:28
Git: move files in an subfolder keeping history

Change structure of project folder with Git

I have this structure:

 project-folder/
     .git
     wp-admin/
     wp-content/
     wp-includes/

.htaccess

@stek29
stek29 / dreame_1c_root.md
Last active March 2, 2024 12:38
Root Dreame Robot without via uart only

These are just my notes, and described process worked for me on my 1C robot
If anything goes wrong, having USB adapter for FEL flashing might be the only way to restore your robot
this is not an official guide
oh, and I'm not responsible for any damage blah blah
and huge thanks to Dennis and Hypfer, and everyone behind this root :)

0. get uboot shell

to enter uboot shell on 1C you have to: 0. turn robot off normally

  1. hook up uart, open console
@josemarimanio
josemarimanio / install_pyenv_mac_zsh.rst
Created May 13, 2020 12:13
Installing pyenv on macOS for Zsh using Homebrew
@btoone
btoone / curl.md
Last active April 2, 2024 20:18
A curl tutorial using GitHub's API

Introduction

An introduction to curl using GitHub's API.

The Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin
@magicdude4eva
magicdude4eva / zsh-syntax-highlighting paste performance improvement
Last active April 19, 2024 14:03
zsh-syntax-highlighting paste performance improvement
Add the following in .zshrc:
...
plugins=(osx git zsh-autosuggestions zsh-syntax-highlighting zsh-nvm docker kubectl)
...
### Fix slowness of pastes with zsh-syntax-highlighting.zsh
pasteinit() {
OLD_SELF_INSERT=${${(s.:.)widgets[self-insert]}[2,3]}
zle -N self-insert url-quote-magic # I wonder if you'd need `.url-quote-magic`?
@darklow
darklow / celery_tasks_error_handling.py
Last active April 20, 2024 16:25
Celery tasks error handling example
from celery import Task
from celery.task import task
from my_app.models import FailedTask
from django.db import models
@task(base=LogErrorsTask)
def some task():
return result
class LogErrorsTask(Task):