Skip to content

Instantly share code, notes, and snippets.

View gr4y's full-sized avatar

Sascha Wessel gr4y

View GitHub Profile
@m4p
m4p / ytredirect.py
Created March 16, 2024 09:41
A redirect server to download audio from YouTube for e.g. podcast hosting
import os
from flask import Flask,redirect
from youtube_dl import YoutubeDL
ydl = YoutubeDL()
app = Flask(__name__)
@app.route('/<ytid>')
def hello(ytid):
ytid = os.path.splitext(ytid)[0]
@wesbos
wesbos / gist:0d5572a29e4f5688a1c8
Last active September 1, 2023 17:59
Handy list of widths to target in a responsive website
320
321
322
323
324
325
326
327
328
329
@robinsmidsrod
robinsmidsrod / logstash.conf
Created December 5, 2012 13:01
Logging Windows event log information to Logstash using nxlog and JSON transport
input {
tcp {
type => "syslog"
host => "127.0.0.1"
port => 3514
}
tcp {
type => "eventlog"
host => "10.1.1.2"
port => 3515
@seidler2547
seidler2547 / screen-ocr
Created November 5, 2012 10:21
Bring back the 90s - Babelfish-style on-screen OCR
#!/bin/bash
# needs:
# - bash
# - xfce4-screenshooter
# - zenity
# - ImageMagick
# - Tesseract OCR (include the languages you want)
[ "$1" ] || exec xfce4-screenshooter -r -o $0
TI=`mktemp`
@ryanb
ryanb / index.js.erb
Created December 16, 2011 23:22
Infinite scrolling solution covered in revised episode #114: http://railscasts.com/episodes/114-endless-page-revised
$('#products').append('<%= j render(@products) %>');
<% if @products.next_page %>
$('.pagination').replaceWith('<%= j will_paginate(@products) %>');
<% else %>
$('.pagination').remove();
<% end %>
@imathis
imathis / gist_tag.rb
Created June 15, 2011 17:58 — forked from chrisjacob/gist_tag.rb
A Liquid tag for Jekyll sites that allows embedding Gists and showing code for non-JavaScript enabled browsers and readers.
require 'cgi'
require 'digest/md5'
require 'net/https'
require 'uri'
module Jekyll
class GistTag < Liquid::Tag
def initialize(tag_name, text, token)
super
@text = text