Skip to content

Instantly share code, notes, and snippets.

zital ZiTAL

Block or report user

Report or block ZiTAL

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
@ZiTAL
ZiTAL / 1_get_list.sh
Created May 31, 2019
bash: loop command from list
View 1_get_list.sh
#!/bin/bash
ls -1 | grep 16599 > 16599.txt
@ZiTAL
ZiTAL / index.html
Created May 3, 2019
hbbtv: cookie and localstorage tester
View index.html
<!DOCTYPE html PUBLIC "-//HbbTV//1.1.1//EN" "http://www.hbbtv.org/dtd/HbbTV-1.1.1.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta http-equiv="content-type" content="application/vnd.hbbtv.xhtml+xml;charset=utf-8"/>
</head>
<body>
<div class="cookie">
<h1>Cookie:</h1>
<p>none</p>
</div>
@ZiTAL
ZiTAL / heroku_stack.sh
Created May 1, 2019
heroku: upgrade stack
View heroku_stack.sh
#!/bin/bash
#upgrade stack: https://dashboard.heroku.com/apps/MY_PROJECT/settings
heroku git:clone -a MY_PROJECT
nano index.php
git add index.php
git commit -m "upgrade"
git push heroku master
View raid.sh
#!/bin/bash
# RAID-a /dev/sda2 /dev/sdb eta /dev/sdc-gaz okindxotez, baie /dev/sdc jodidu eindxe, konponduteko, RAID-e gelditsu, eta ondo dauzen diskuekaz montatie ezan da "trukue"
# eskerrak: https://serverfault.com/a/708464/143613
mdadm -Esv
mdadm --stop /dev/md*
mdadm --verbose --assemble --force /dev/md0 /dev/sda2 /dev/sdb
@ZiTAL
ZiTAL / inline.js
Last active Apr 25, 2019
js: dynamic js load
View inline.js
(function()
{
'use strict';
function loadJs(ar, f)
{
var head = document.querySelector('head');
var l = ar.length;
var count = 0;
for(var i in ar)
@ZiTAL
ZiTAL / audio_mixing.sh
Created Apr 23, 2019
ffmpeg: add mixing audio to video
View audio_mixing.sh
ffmpeg -y -i b.mp4 -i 01.aac -filter_complex "[0:0][1:0] amix=inputs=2:duration=longest" output.mp4
@ZiTAL
ZiTAL / curl_time.sh
Created Mar 18, 2019
curl: get response time
View curl_time.sh
#!/bin/bash
# based on:
# https://stackoverflow.com/a/47944496/454827
# https://stackoverflow.com/a/49502232/454827
#curl --silent --output /dev/null -w "
#namelookup: %{time_namelookup}s\n\
#connect: %{time_connect}s\n\
#appconnect: %{time_appconnect}s\n\
@ZiTAL
ZiTAL / date-sync.py
Created Jan 18, 2019
python: erlojua interneteko web orri batekin zinkronizatzeko script-a
View date-sync.py
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import pycurl
from io import BytesIO
import re
from subprocess import Popen, PIPE
url = 'https://www.timeanddate.com'
@ZiTAL
ZiTAL / korrika.html
Created Jan 11, 2019
html: korrika bilatzailea 2019
View korrika.html
<!DOCTYPE html><html lang="en">
<head>
<meta charset="utf-8">
<title>Korrika 2019</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<div class="korrika_form">
<form onsubmit="return false;" class="pure-form" style="margin:30px 0 40px">
<input class="korrika_bilatzailea" autofocus type="text" name="q" placeholder="Herriaren izena..." style="width:100%;max-width:600px;outline:0">
@ZiTAL
ZiTAL / ffmpeg.sh
Created Jan 10, 2019
ffmpeg: video to gif
View ffmpeg.sh
#!/bin/bash
ffmpeg -i input.mp4 -vf fps=10,scale=320:-1:flags=lanczos,palettegen palette.png
ffmpeg -i input.mp4 -i palette.png -filter_complex "fps=10,scale=320:-1:flags=lanczos[x];[x][1:v]paletteuse" output.gif
You can’t perform that action at this time.