Skip to content

Instantly share code, notes, and snippets.

View cj-praveen's full-sized avatar

Praveen cj-praveen

View GitHub Profile
@artbikes
artbikes / yooper.sh
Created December 5, 2017 21:54
Display title of youtube video
#!/bin/bash
curl -s \
--data-urlencode "url=$1" \
--data-urlencode "format=json" \
http://www.youtube.com/oembed |
jq '.title'
@jimmywarting
jimmywarting / readme.md
Last active June 29, 2025 03:40
Cors proxies
Exposed headers
Service SSL status Response Type Allowed methods Allowed headers
@bashkirtsevich
bashkirtsevich / ffplay.c
Created November 23, 2016 10:03
ffplay source code
/*
* Copyright (c) 2003 Fabrice Bellard
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
@geuis
geuis / gist:8b1b2ea57d7f9a9ae22f80d4fbf5b97f
Last active January 10, 2024 16:43
Get Youtube video urls
// Run from the dev tools console of any Youtube video
// Accurate as of July 2, 2020.
//
// Copy and paste this into the dev console in a browser with the desired video loaded.
//
// NOTE: Some Youtube videos do not directly expose the video url in the response.
// This script doesn't currently attempt to handle those. It will work for most other general video types though.
(async () => {
const html = await fetch(window.location.href).then((resp) => resp.text()).then((text) => text);
@midoriiro
midoriiro / bluetooth_switcher.py
Last active September 11, 2021 15:04
Bluetooth switcher in PyQt 5.5
'''
I've installed a new wifi card on my laptop with bluetooth support,
but there is no shortcut in my keyboard to swtich on/off bluetooth.
This script + custom shortcut with your linux DE (or other) work perfectly
'''
from PyQt5.QtCore import QCoreApplication
from PyQt5.QtBluetooth import QBluetoothLocalDevice
if __name__ == '__main__':
@TheZoc
TheZoc / mp3-to-m4r.bat
Created June 25, 2015 02:51
Convert a MP3 file to an Apple iPhone's ringtone file (M4R), using FFMPEG.
@echo off
rem =====================================================
rem Converts a MP3 file to a M4R file using ffmpeg.
rem Usage: Drop a MP3 file at the top of this batch file.
rem =====================================================
set ffmpeg_exe="C:\ffmpeg\ffmpeg-20150619-git-bb3703a-win64-static\bin\ffmpeg.exe"
rem %~f1 = Full File Path, with drive letter
rem %~p1 = Drive Letter
rem %~p1 = Path Only
@syndbg
syndbg / fetch.py
Created July 14, 2014 00:14
A small Python script, that fetches a YouTube playlist's videos titles and writes them to a file playlist.txt in the same directory. Usage? A legal backup against video deletion. You could always find the song if you know the song title before it got removed
import gdata.youtube
import gdata.youtube.service
# Dependencies:
# - Python==2.7
# - gdata==2.0.18
# - google-api-python-client==1.2
@jefftriplett
jefftriplett / tor.py
Last active March 19, 2025 16:34
Python Requests + Tor (Socks5)
"""
setup:
pip install requests
pip install requests[socks]
super helpful:
- http://packetforger.wordpress.com/2013/08/27/pythons-requests-module-with-socks-support-requesocks/
- http://docs.python-requests.org/en/master/user/advanced/#proxies
"""
@vitaliykononov
vitaliykononov / youtubeinfo
Last active December 20, 2022 09:17
Get Youtube info
<html>
<head>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.5.1.min.js"></script>
<script type= "text/javascript">
function getYouTubeInfo() {
$.ajax({
url: "http://gdata.youtube.com/feeds/api/videos/<?php echo $_GET['v']; ?>?v=2&alt=json",
dataType: "jsonp",
success: function (data) { parseresults(data); }
});
@dfuenzalida
dfuenzalida / youtube-api-play-pause.html
Created December 9, 2013 21:14
Creating several YouTube videos, play and pause using JS
<div id="player-TMoPuv-xXMM"></div>
<hr/>
<div id="player-bpOR_HuHRNs"></div>
<a href="#" id="pause">Pause</a>
<a href="#" id="resume">Resume</a>
<script src="http://www.youtube.com/player_api"></script>
<script>
// 3. This function creates an <iframe> (and YouTube player)