Skip to content

Instantly share code, notes, and snippets.

View rocammo's full-sized avatar
🎯
Focusing

Rodrigo Casamayor rocammo

🎯
Focusing
View GitHub Profile
@rocammo
rocammo / alacritty.yml
Last active May 9, 2020 23:53
Horizon's color scheme for the Alacritty terminal emulator
# Colors (Horizon)
colors:
primary:
background: '#1C1E26'
foreground: '#D5D8DA'
normal:
black: '#16161C'
red: '#E95678'
PROMPT="%(?:%{$fg_bold[green]%}%n@%m:%{$fg_bold[red]%}%n@%m)"
PROMPT+=':%{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info)'
PROMPT+=$'\n'"$ "
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}git:(%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"
RPROMPT="[%*]"
@rocammo
rocammo / settings.json
Created April 25, 2020 22:20
Horizon's color scheme for the Windows Terminal (WSL)
"schemes": [
{
"name" : "Horizon",
"background" : "#1C1E26",
"black" : "#16161C",
"blue" : "#26BBD9",
"cyan" : "#59E1E3",
"foreground" : "#D5D8DA",
"green" : "#29D398",
"purple" : "#EE64AC",
@rocammo
rocammo / docker-compose.yml
Created February 4, 2020 19:59
This script will run PostgreSQL and pgAdmin using Docker.
version: "3.5"
services:
postgres:
container_name: postgres_container
image: postgres
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: suppliers

Keybase proof

I hereby claim:

  • I am rocammo on github.
  • I am rocammo (https://keybase.io/rocammo) on keybase.
  • I have a public key whose fingerprint is EE9D DF77 2F1D 9B16 65D6 9A8D F211 E606 E3D7 0F92

To claim this, I am signing this object:

@rocammo
rocammo / free_parking_detector.ino
Last active December 28, 2019 23:17
monitors the actual occupancy of a parking lot
const int trigpin = 13; // select the pin for the 'trig' ultrasonic sensor
const int echopin = 12; // select the pin for the 'echo' ultrasonic sensor
const int redpin = 11; // select the pin for the red LED
const int greenpin = 10; // select the pin for the green LED
const int bluepin = 9; // select the pin for the blue LED
void setup () {
// set ultrasonic sensor pin modes
pinMode(trigpin, OUTPUT);
@rocammo
rocammo / blockstack.md
Last active July 6, 2019 09:14
blockstack.org proof
@rocammo
rocammo / check_valid_mac.cpp
Created May 15, 2019 12:43
Checks if a provided MAC address is valid
bool check_valid_mac(u_char *mac) {
/* Check for the colons */
for (int i = 2; i < strlen((char*)mac); i += 3) {
if (mac[i] != ':') {
return false;
}
}
/* Check that the rest are valid characters */
for (int i = 0; i < strlen((char*)mac); i++) {
@rocammo
rocammo / account_generator.py
Last active March 22, 2019 09:46
Cold-Storage Ethereum Account Generator
#!/usr/bin/env python3
"""
Cold-Storage Ethereum Account Generator
@author: rocammo
@date: 22 mar. 2019
"""
import sys, getopt
from datetime import datetime
$ wget http://downloads.sourceforge.net/project/glfw/glfw/3.0.1/glfw-3.0.1.zip
$ unzip glfw-3.0.1.zip
$ cd glfw-3.0.1/
$ mkdir build
$ cd build
$ export MACOSX_DEPLOYMENT_TARGET=10.8
$ cmake -D GLFW_NATIVE_API=1 -D CMAKE_OSX_ARCHITECTURES="i386;x86_64" -D BUILD_SHARED_LIBS=ON -D CMAKE_C_COMPILER=clang ../
$ make
$ ls -l src/libglfw*