Skip to content

Instantly share code, notes, and snippets.

View nicovillanueva's full-sized avatar
🥃

Nico nicovillanueva

🥃
  • Spain
View GitHub Profile
@nicovillanueva
nicovillanueva / gist:fc9c33cf9b6dfbdd9738254e2e9b2fcb
Last active March 25, 2025 20:12
[Tizen] How to sign and install apps

The following was all done on an Ubuntu 24.0something

Prerequisite: put your TV in developer mode.

  1. Install Tizen Studio >=6.0 (previous versions failed horribly when generating certificates, but that's my experience at least)
  2. In Tizen's package manager, install:
    a. (Main SDK tab) Tizen SDK tools > Baseline SDK > Certificate Manager
    b. (Extension SDK tab) Extras > Samsung Certificate Extension
  3. Connect to your TV and get its DUID
    a. In the Tizen main screen, select Tools > Device Manager

How to change the default values for Docker in different distros Usually, to change the storage driver

CentOS

sudo vim /etc/sysconfig/docker
sudo systemctl restart docker

Debian-based

Keybase proof

I hereby claim:

  • I am nicovillanueva on github.
  • I am nicovillanueva (https://keybase.io/nicovillanueva) on keybase.
  • I have a public key whose fingerprint is D11E 9648 9F80 1905 1778 78DC 12AC 3258 B117 94D0

To claim this, I am signing this object:

@nicovillanueva
nicovillanueva / getfiles.sh
Last active May 23, 2016 05:46
Audio analysis
#!/bin/bash
wget -O stereo_2205k_16bit.wav http://download.wavetlan.com/SVV/Media/HTTP/test_stereo_22050Hz_16bit_PCM.wav
wget -O mono_441k_8bit.wav http://download.wavetlan.com/SVV/Media/HTTP/test_mono_44100Hz_8bit_PCM.wav

Docker utilities

Just some quick functions to work with Docker, Machine and Swarm.

Copy it into your home, source it using your .bashrc and enjoy:
echo "source .bash_docker_funcs.sh" >> $HOME/.bashrc

@nicovillanueva
nicovillanueva / main
Last active August 29, 2015 14:23
Relay + Temp sensor
#!/usr/bin/python
import Adafruit_BBIO.GPIO as GPIO
from w1thermsensor import W1ThermSensor
import time, json, thread
TARGETTEMP = 80.0
THRESHOLD = 1.0
READDELAY = 5
@nicovillanueva
nicovillanueva / getDockerIp
Last active August 29, 2015 14:21
Get the IP of a running Docker container, by partial name search
#!/usr/bin/python3
# If you have the exact name of the container, just run:
# docker inspect --format {{.NetworkSettings.IPAddress}} <container_name>
import subprocess, json, argparse, sys
parser = argparse.ArgumentParser()
parser.add_argument('-n', '--name', required=True, help='Name of the container you want the IP of')
@nicovillanueva
nicovillanueva / running_proc.sh
Last active August 29, 2015 14:10
Running processes names
#!/bin/bash
ps aux | awk '{print $11}' | sort | uniq
@nicovillanueva
nicovillanueva / untitled
Created October 15, 2014 04:12
Split & sort
import argparse
def split_logins(logins):
for each in logins:
yield each.split(":")
parser = argparse.ArgumentParser()
parser.add_argument('lists', type=str, nargs='+')
args = parser.parse_args()
@nicovillanueva
nicovillanueva / Dice thrower
Created July 31, 2014 05:08
Generates dice throws for D&D (or originally thought for such), and kept me busy for 10 minutes.
#!/usr/bin/python
import random
d = raw_input("Using dice: d")
a = raw_input("How many die?: ")
t = raw_input("How many times?: ")
if a == "": a=1
if t == "": t=1
for times in range(int(t)):
if t > 1: print "--- Throw " + str(times+1)