Skip to content

Instantly share code, notes, and snippets.

View weswski's full-sized avatar

Marcin Wesołowski weswski

  • Bern, Switzerland
View GitHub Profile
@BenjaminPoncet
BenjaminPoncet / ffmpeg-wrapper
Last active January 9, 2025 22:51
Synology VideoStation ffmpeg wrapper with DTS, EAC3 and TrueHD support. This project is no longer maintained: Please see the following projects: https://github.com/darknebular/Wrapper_VideoStation/ - https://github.com/AlexPresso/VideoStation-FFMPEG-Patcher
#!/bin/bash
rev="12"
_log(){
echo "$(date '+%Y-%m-%d %H:%M:%S') - ${streamid} - $1" >> /tmp/ffmpeg.log
}
_log_para(){
echo "$1" | fold -w 120 | sed "s/^.*$/$(date '+%Y-%m-%d %H:%M:%S') - ${streamid} - = &/" >> /tmp/ffmpeg.log
@meetkabeershah
meetkabeershah / default nginx configuration file
Last active January 11, 2025 12:19
The default nginx configuration file inside /etc/nginx/sites-available/default
# Author: Zameer Ansari
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart
# http://wiki.nginx.org/Configuration
#
# Generally, you will want to move this file somewhere, and start with a clean
# file but keep this around for reference. Or just disable in sites-enabled.
#
@bcomnes
bcomnes / git-gpg.md
Last active December 14, 2024 13:50
my version of gpg on the mac
  1. brew install gnupg, pinentry-mac (this includes gpg-agent and pinentry)

  2. Generate a key: $ gpg --gen-key

  3. Take the defaults. Whatevs

  4. Tell gpg-agent to use pinentry-mac:

    $ vim ~/.gnupg/gpg-agent.conf 
    
@st4lk
st4lk / django_log_settings.py
Last active December 2, 2022 07:14
Django logging settings
# Logging settings for django projects, works with django 1.5+
# If DEBUG=True, all logs (including django logs) will be
# written to console and to debug_file.
# If DEBUG=False, logs with level INFO or higher will be
# saved to production_file.
# Logging usage:
# import logging
# logger = logging.getLogger(__name__)
# logger.info("Log this message")
@oskar456
oskar456 / hanoi-iter.py
Last active March 15, 2018 04:18
Hanoi towers recursive and iterative solution
#!/usr/bin/env python3
# vim: ts=4 expandtab
import sys
class Peg:
""" Stack representing one Hanoi peg. """
def __init__(self, n=0):
self.stack = []
self.stack.extend(range(1,n+1))
@eendeego
eendeego / launch.sh
Created February 5, 2013 21:39
Launch TopCoder Arena on OS X with Java 7/8
#!/bin/bash
cd `dirname $0`
curl\
--remote-name \
--remote-header-name\
http://www.topcoder.com/contest/arena/ContestAppletProd.jnlp
JAVAWS="/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/javaws"
@pelagisk
pelagisk / gist:2984621
Created June 24, 2012 19:31
Towers of hanoi - iterative
#/usr/bin/env/python
""" towers of hanoi
There is a legend about an Indian temple which contains a large room
with three time-worn posts in it surrounded by 64 golden
disks. Brahmin priests, acting out the command of an ancient prophecy,
have been moving these disks, in accordance with the rules of the
puzzle, since that time. The puzzle is therefore also known as the
Tower of Brahma puzzle. According to the legend, when the last move of
@heisters
heisters / Solarized High Contrast Dark.itermcolors
Created June 8, 2011 21:49
Solarized High Contrast Dark theme for iTerm2
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Blue Component</key>
<real>0.19370138645172119</real>
<key>Green Component</key>
<real>0.15575926005840302</real>
@stwalkerster
stwalkerster / sfnet2github.sh
Created May 17, 2011 17:18
SourceForge.net svn repo to github git repo import script

Licence (MIT Licence)

Copyright (c) 2011 Simon Walker

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

@melborne
melborne / chat_client.rb
Created November 10, 2008 08:12
shoes app with druby & observer pattern
require "drb/drb"
DRb.start_service
$lists = DRbObject.new_with_uri('druby://192.168.1.3:12345')
Shoes.app :width => 250, :height => 300 do
flow do
@input = edit_line :width => 150 do |ed|
$lists[:client_line] = ed.text
end