Skip to content

Instantly share code, notes, and snippets.

@manueldev
manueldev / gist:d676a62afcefd81a3cb8
Created October 7, 2014 02:36
Fix Ubuntu - Microsoft Virtual PC 2007 "Error!! No Windows hypervisor detected!!" (24-bit color depth problem)
HvInit() ERROR!! No Windows hypervisor detected!!
VmbusInitialize() ERROR!! Unable to initlialize the hypervisor - 0xffffffff
vmbus_bus_init() ERROR!! Unable to initialize vmbus (-1)
Video artifacts (green, black).
Unable to login.
Reason: 24-bit color depth no support by Microsft Virtual PC 2007.
@manueldev
manueldev / gist:06e35cbf07e97b5ae082
Created October 7, 2014 04:49
GRUB for Ubuntu (server) 10.04 on Microsoft Virtual PC 2007
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT=" quiet vga=769"
GRUB_CMDLINE_LINUX=""
@manueldev
manueldev / gist:61e1474b73cd06db9dba
Last active August 29, 2015 14:07
Ver Twitch.tv en VLC (windows)
Para ver Twitch.tv en VLC y asi aprovechar la aceleracion grafica del pc.
Bajar https://github.com/chrippa/livestreamer/releases/download/v1.10.2/livestreamer-v1.10.2-win32-setup.exe
Instalar ;)
Abrir cmd (ejecutar -> cmd.exe)
escribir: livestreamer twitch.tv/colemonotv [calidad]
<?xml version="1.0" encoding="UTF-8"?>
<items>
<playlist_name>eventosCL</playlist_name>
<channel>
<title>Papa a la deriva capitulo viernes</title>
<logo_30x30>http://www.mega.cl/v3/website/themes/img/logoMega.png</logo_30x30>
<description>ONLINE</description>
<stream_url><![CDATA[http://edge-81-cl.edge.mdstrm.com/media-cl/_definst_/smil:55b2b4eb7aa7a31a38514cc2/chunklist_b2369000.m3u8?access_token=7bXyvqAQJxcY6xGNYBe5DuygwNsyxHtLSiuUNnR2OCKNhvJzSysgYEXmgBxFLrtaLBGrKVZGbKc]]></stream_url>
</channel>
<channel>
def sumaDosValores( x, y ):
suma = x + y
print ("EL RESULTADO ES %d") %suma
sumaDosValores(4 , 6)
bottles = 99
while bottles > 1:
print "%d bottles of beer on the wall, %d bottles of beer.\nTake one down and pass it around, %d bottles of beer on the wall.\n" % (bottles, bottles, bottles-1)
bottles -= 1
print "1 bottle of beer on the wall, 1 bottle of beer.\nTake one down and pass it around, no more bottles of beer on the wall.\n\nNo more bottles of beer on the wall, no more bottles of beer.\nGo to the store and buy some more, 99 bottles of beer on the wall.\n"
$( "body" ).html("");
for(var num = 0; num <= 200; num++){
(function (num) {
$.get( url + num + "/Manifest", function( data ) {
$( "body" ).append( "canal" + num + " ok <a href=\"" + url + num + "/playlist.m3u8\">link</a><br>");
});
})(num);
}
@manueldev
manueldev / gist:6037308
Created July 19, 2013 07:21
ffmpeg webcam streaming
ffmpeg -f dshow -i video="HP Webcam [2 MP Fixed]" -s 640x480 -r 20 -tune zerolatency -b:v 2000k -c:v libx264 -preset ultrafast -pix_fmt yuv420p -g 1 -f mpegts -t 180 udp://127.0.0.1:80?pktsize=188&buffer_size=65535
@manueldev
manueldev / gist:6047712
Created July 21, 2013 06:32
ffmpeg Mkv mp4 dts to Mp4 ac3 Some Sony TV models don't read DTS.
ffmpeg -i inputfile.mp4 -vcodec copy -acodec ac3 -ac 6 -ab 448k outputfile.mp4
@manueldev
manueldev / gist:6050316
Created July 21, 2013 22:51
Agregando audio ac3 (latino) a vídeo mkv, y transformándolo a mp4. Sin conversión. Google translate: Adding audio ac3 (Latin) to mkv video, and transforming to mp4. Without conversion.
ffmpeg -i inputvideofile.mkv -i inputaudiofile.ac3 -map 0:[number of video stream] -map 1[number of audio stream] -c copy outputfile.mp4