Skip to content

Instantly share code, notes, and snippets.

@snim2
snim2 / autoupdate.py
Created April 20, 2011 20:01
Automatically update an app from a remote Mercurial repository
#!/usr/bin/env python
"""
Basic app which can be updated directly from a Mercurial repository.
Copyright (C) Sarah Mount, 2011.
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 2
@bsdnoobz
bsdnoobz / read-camera.py
Last active December 22, 2023 18:20
Displaying webcam feed using OpenCV and Python+PySide.
#!/usr/bin/env python
from PySide.QtCore import *
from PySide.QtGui import *
import cv2
import sys
class MainApp(QWidget):
def __init__(self):
@olasd
olasd / stream_to_youtube.sh
Created March 28, 2014 19:58
Stream video to youtube via ffmpeg
#! /bin/bash
#
# Diffusion youtube avec ffmpeg
# Configurer youtube avec une résolution 720p. La vidéo n'est pas scalée.
VBR="2500k" # Bitrate de la vidéo en sortie
FPS="30" # FPS de la vidéo en sortie
QUAL="medium" # Preset de qualité FFMPEG
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" # URL de base RTMP youtube
@shahril96
shahril96 / php_encoder.php
Created February 3, 2015 17:32
Simple PHP Obfuscator
// this was my attempt to write my own php obfuscator
// this was inspired by Carbylamine PHP Script Encoder
// its currently in alpha, because sometimes its work, and sometimes it doesnt
// this was written 3 years ago (ahh memories again)
// so code looks suck
// thanks to Mokhdzani Faeq for created good regexs
// have fun!
<?php
@peace098beat
peace098beat / MainApplication.py
Created April 28, 2015 12:18
[PyQt] Drag and Drop files
class MainWidget(QtGui.QMainWindow):
def __init__(self, parent=None):
super(MainWidget, self).__init__(parent)
self.setWindowTitle("FiFiFactory App")
self.resize(720,480)
self.setAcceptDrops(True)
def dragEnterEvent(self, event):
if event.mimeData().hasUrls():
event.accept()
@rendro
rendro / parsecookie.js
Last active May 4, 2024 15:38
Parse document.cookie into object
document.cookie.split(';').map(function(c) {
return c.trim().split('=').map(decodeURIComponent);
}).reduce(function(a, b) {
try {
a[b[0]] = JSON.parse(b[1]);
} catch (e) {
a[b[0]] = b[1];
}
return a;
}, {});
@techtonik
techtonik / webview.py
Last active October 27, 2023 10:33
View HTML content in Python with PySide
"""
Placed into public domain by
anatoly techtonik <techtonik@gmail.com>
Show HTML in GUI window through PyQt4/PySide.
[ ] position window at the center of the screen
(right now it is middle bottom)
[ ] implement lazy loading for PyQt4/PySide
"""
@peace098beat
peace098beat / gui_FileListWidget.py
Created September 9, 2015 09:06
[PySide] ドラッグドロップでファイル一覧を表示するQListViewウィジェット
#! encoding:utf-8
"""
gui_fileListWidget.py
Description:
ドラッグアンドドロップでファイルリストを表示するウィジェット
本当のデータはmodelが格納している。
Delegeteはリストのindex毎にModeからデータを読み出している。
Example:
@peace098beat
peace098beat / pyBrowser.py
Created March 22, 2016 08:36
[PySide] QWebView
#! coding:utf-8
"""
a
Created by 0160929 on 2016/03/18 10:40
"""
from PySide.QtNetwork import QNetworkProxy
__version__ = '0.2'
__app_name__ = 'Recomen'
@tzmartin
tzmartin / m3u8-to-mp4.md
Last active July 22, 2024 19:15
m3u8 stream to mp4 using ffmpeg

1. Copy m3u8 link

Alt text

2. Run command

echo "Enter m3u8 link:";read link;echo "Enter output filename:";read filename;ffmpeg -i "$link" -bsf:a aac_adtstoasc -vcodec copy -c copy -crf 50 $filename.mp4