Skip to content

Instantly share code, notes, and snippets.

🐧
I have no idea what I'm doing

Eduardo Mínguez e-minguez

🐧
I have no idea what I'm doing
Block or report user

Report or block e-minguez

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@e-minguez
e-minguez / .bashrc
Created Mar 5, 2019
pinebook bashrc to show battery status
View .bashrc
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
alias ls='ls --color=auto'
battery_status(){
View gist:c07fa3d23ff5f8a6a7894db23c94e1ce
# Based on
# https://github.com/gamelaster/pine64-linux-build
# https://github.com/ARM-software/arm-trusted-firmware
# https://wiki.linaro.org/HowTo/BuildArm64Kernel
# https://github.com/anarsoul/linux-build
# https://github.com/anarsoul/PKGBUILDs/tree/master/linux-pine64
# https://gist.github.com/e-minguez/837054d45b0119fcb2e37e2b0fb16bae
# https://github.com/e-minguez/gpd-pocket-fedora
LINARO_LATEST_TOOLCHAIN="gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu"
View gist:837054d45b0119fcb2e37e2b0fb16bae
# Based on
# https://github.com/gamelaster/pine64-linux-build
# https://github.com/ARM-software/arm-trusted-firmware
# https://wiki.linaro.org/HowTo/BuildArm64Kernel
# https://github.com/anarsoul/linux-build
# https://github.com/anarsoul/PKGBUILDs/tree/master/linux-pine64
LINARO_LATEST_TOOLCHAIN="gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu"
sudo apt-get install -y \
@e-minguez
e-minguez / gist:a993dee4e9e8b35593e874221576fba1
Created Jan 10, 2019
Lock screen & unlock screen commands
View gist:a993dee4e9e8b35593e874221576fba1
# Lock
gdbus call --session --dest org.gnome.ScreenSaver --object-path /org/gnome/ScreenSaver --method org.gnome.ScreenSaver.Lock
# Unlock
loginctl unlock-session && xset dpms force on
@e-minguez
e-minguez / freebsd_on_gcp_free_tier.md
Last active Dec 12, 2018
FreeBSD 12.0-RELEASE on GCP free tier
View freebsd_on_gcp_free_tier.md

FreeBSD on GCP free tier

Account

Create a GCP account, accept the terms, etc.

NOTE: There are ton of details skipped here such as the VPC, firewall, etc. this is just a quick introduction :)

SSH keys

First, create the ssh-keys:

View cura.desktop
[Desktop Entry]
Type=Application
Name=Cura 3.6.0
Comment=Cura
Icon=/home/edu/.local/share/applications/cura.png
Exec=/home/edu/bin/Ultimaker_Cura-3.6.0.AppImage
View dump.yml
---
# To be used as:
# ansible-playbook --user openshift -i /usr/share/ansible/openshift-ansible/playbooks/openstack/inventory.py -i inventory dump.yml
- name: Dump debug info
hosts: all
become: yes
tasks:
- name: Print some debug information
vars:
View netbsd pine.md

NetBSD image

sudo dd if=./NetBSD-evbarm-aarch64-201811042130Z-pine64.img of=/dev/sdb

First boot

  • Plug the microsd into the pine
  • Boot the pine and wait for a couple of reboots (disk expansion)
@e-minguez
e-minguez / pb
Last active Oct 26, 2018
This snippet is to be used as `my_time_consuming_command && pushbullet "title" "finished"`
View pb
#!/bin/bash
TOKEN="xxx"
TITLE=${1:-TITLE}
MESSAGE=${2:-MESSAGE}
curl --header "Access-Token: ${TOKEN}" \
--header 'Content-Type: application/json' \
--data-binary "{\"body\":\"${MESSAGE}\",\"title\":\"${TITLE}\",\"type\":\"note\"}" \
--request POST --silent -o /dev/null \
https://api.pushbullet.com/v2/pushes
View delete-nets-openstack.sh
#!/bin/sh
# openstack router list && openstack subnet list && openstack network list
ROUTER=$1
SUBNET=$2
NETWORK=$3
echo "Removing ${ROUTER}"
openstack router remove subnet ${ROUTER} ${SUBNET}
openstack router unset --external-gateway ${ROUTER}
for PORT in $(openstack port list --router ${ROUTER} --format=value -c ID)
You can’t perform that action at this time.