Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@emilio1625
emilio1625 / gst-omx_install.sh
Last active April 24, 2018 01:12
Compilling gst-omx on fedberry 27 (fedora)
# Setup a development enviroment
sudo dnf group install "Development Tools" "Development Libraries"
sudo dnf install gstreamer1-plugins-base-devel gstreamer1-plugins-base-devel libtool raspberrypi-vc-libs-devel
# Maybe (not) necessary
sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
sudo dnf install gstreamer1-plugins{-good,-ugly,-bad{-free,-nonfree,-freeworld}} ffmpeg libomxil-bellagio
# Clone the repo (github mirror)
git clone -b 1.12 https://github.com/GStreamer/gst-omx.git
@emilio1625
emilio1625 / sp
Last active July 4, 2018 02:53 — forked from rarrais/sp
sp is a command-line client for Spotify's dbus interface. Play, pause, skip and search tracks from the comfort of your command line.
#!/usr/bin/env bash
#Edited to allow for authentication with Spotify API required for search function.
#
# This is sp, the command-line Spotify controller. It talks to a running
# instance of the Spotify Linux client over dbus, providing an interface not
# unlike mpc.
#
# Put differently, it allows you to control Spotify without leaving the comfort
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
File: str27seg.py
Author: emilio1625
Email: emilio1625@gmail.com
Github: https://github.com/emilio1625
Description: Creates a hex file with the bytes needed to display a string in a
7 segment display. Useful for programming an EEPROM to display text.
"""
@emilio1625
emilio1625 / convert_videos.sh
Created November 30, 2018 20:45
Converts MOV videos to MKV using FFMPEG and NVIDIA HW accel
#!/bin/bash
for video in *; do
extension="${video##*.}"
nombre="${video%.*}"
if [ $extension == "MOV" ]; then
ffmpeg -hwaccel cuvid -c:v h264_cuvid -i $nombre.$extension -c:v h264_nvenc -preset slow $nombre.mkv
if [ $? -ne 0 ]; then
echo $nombre.$extension >> failed.txt
fi
fi
@emilio1625
emilio1625 / bandit.overthewire.sh
Last active March 31, 2020 19:47
Script to help you to connect to the next level of the bandit game of overthewire.org
#!/bin/bash
# $1 = starting level, zero if unset
# $2 = end level, 34 if unset
NORMAL="\e[0m"
RED="\e[1;31m"
i=${1:-0}
end=${2:-34}
ABS
ADSL
Abad
Abadía
Abalá
Abasolo
Abasticos
Abello
Aboabo
Acacias
letters = set('áÁéÉíÍóÓúÚoOiIlLeEaAsSzZgGtTbBcCdDfF')
with open("Spanish.dic") as f:
words = f.read().splitlines()
for word in words:
if letters >= set(word):
print(word)
"""
This makes the python interpreter to print integers as hexadecimal or binary
this is based in a stack overflow answer but i cant find the original source :c
"""
import sys, math
def nbits(a, pad=4):
"""