Skip to content

Instantly share code, notes, and snippets.

View kijart's full-sized avatar
🎯
Focusing

LuisMi kijart

🎯
Focusing
View GitHub Profile
@kijart
kijart / TuneRPI.sh
Created April 7, 2014 19:22 — forked from enxt/TuneRPI.sh
#!/bin/sh
sudo apt-get update
sudo apt-get -y upgrade
sudo dpkg-reconfigure tzdata
sudo apt-get -y install console-data locales
sudo dpkg-reconfigure console-data
sudo dpkg-reconfigure locales
@kijart
kijart / YouTubePlayer-fixed.py
Created May 23, 2014 07:02
Fix for XBMC Youtube plugin (v4.4.6) plugin.video.youtube-4.4.6
'''
YouTube plugin for XBMC
Copyright (C) 2010-2012 Tobias Ussing And Henrik Mosgaard Jensen
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
@kijart
kijart / build.prop
Created January 16, 2016 19:35
Nexus One CM7 build.prop
# begin build properties
# autogenerated by buildinfo.sh
ro.build.id=GRK39F
ro.build.display.id=GWK74
ro.build.version.incremental=eng.jenkins.20120615.195908
ro.build.version.sdk=10
ro.build.version.codename=REL
ro.build.version.release=2.3.7
ro.build.date=Fri Jun 15 19:59:18 PDT 2012
ro.build.date.utc=0
@kijart
kijart / rename-with-date.sh
Created May 18, 2018 22:15
Rename current directory file names with exif creation date
#!/bin/sh
for file in *.*
do
if [[ $file != `basename $0` && $file != ".DS_Store" ]]; then
extension=`echo "$file" | cut -d'.' -f2`
mv -n "$file" "$(exiftool -d "%Y%m%d_%H%M%S" -CreateDate "$file" | awk -v ext=$extension '{print $4 "." ext}')"
fi
done
@kijart
kijart / hash-map-test.py
Created May 22, 2018 10:40
Hash map tests in Python
country_languages = {
'AT': ['de-AT', 'en', 'fr'],
'CH': ['de-CH', 'en', 'fr'],
'DE': ['de-DE', 'en', 'fr'],
}
languages_hash = {}
for country_code, language_codes in country_languages.items():
for language_code in language_codes:
@kijart
kijart / README.md
Created June 15, 2018 18:11
Quotefancy wallpapers downloader
@kijart
kijart / get-emails.js
Last active July 4, 2018 17:32
Get GitHub emails from current repository
javascript: (() => {
const regex = /^https:\/\/github\.com\/([a-zA-Z0-9-_.]+\/[a-zA-Z0-9-_.]+)/g;
const regexMatch = regex.exec(window.location.href);
if (!regexMatch) {
alert('Wrong site, use this script in a URL like: https://github.com/user/repository-name');
return;
}
@kijart
kijart / install-docker-debian.sh
Last active March 22, 2020 18:46
Script for the setup and installation of Docker and Docker Compose in Debian & Ubuntu
#!/usr/bin/env bash
# Download and run interactive scripts: bash <(wget -qO- https://domain.url/path/install-docker.sh)
# Script for the setup and installation of Docker and Docker Compose in Debian
echo "You are going to execute a script for the setup and installation of Docker and Docker Compose in Debian"
echo "Are you sure?"
select yn in "Confirm" "Cancel"; do
case $yn in
@kijart
kijart / media-queries.css
Created March 14, 2019 12:46
CSS media queries for desktop, tablet and mobile
/*
* Device: Desktops
* Screen: 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
/* CSS */
}
/*
* Device: Laptops, Desktops
function hex2binDownload(hex, fileName) {
const binary = hex.match(/[A-F0-9]{2}/g).map((value) => parseInt(value, 16));
const byteArray = new Uint8Array(binary);
let a = window.document.createElement('a');
a.href = window.URL.createObjectURL(new Blob([byteArray], { type: 'application/octet-stream' }));
a.download = fileName;
document.body.appendChild(a)
a.click();
document.body.removeChild(a)