Skip to content

Instantly share code, notes, and snippets.

View GeorgeL9's full-sized avatar
🍻

George Lejnine GeorgeL9

🍻
  • Colorado
  • 00:44 (UTC -06:00)
View GitHub Profile
@abe-101
abe-101 / youtube_to_captivate.py
Last active March 12, 2024 00:14
convert youtube video to captivate.fm podcast
#!/usr/bin/python
import os
from datetime import datetime, time
from typing import Dict, Union
import requests
from dotenv import load_dotenv
from yt_dlp import YoutubeDL
import Foundation
import Foundation
import AVFoundation
class AudioSplitter {
var filePrepend: String = "file://"
var fileSeparator: Character = "."
var fileSplitAppend: String = "-split-"
@ryancat
ryancat / colorDiffUtil.js
Created May 9, 2018 06:07
Color difference in RGB and LAB
/**
* Compare color difference in RGB
* @param {Array} rgb1 First RGB color in array
* @param {Array} rgb2 Second RGB color in array
*/
export function deltaRgb (rgb1, rgb2) {
const [ r1, g1, b1 ] = rgb1,
[ r2, g2, b2 ] = rgb2,
drp2 = Math.pow(r1 - r2, 2),
dgp2 = Math.pow(g1 - g2, 2),
@jbgo
jbgo / Makefile
Created September 2, 2016 16:41
My vagrant setup for python flask apps
SHELL = /bin/bash
WORKDIR = /vagrant
PSQL = sudo -u postgres psql
DBNAME = changeme
DBUSER = changeme_user
DBPASS = secret
db/console:
$(PSQL) $(DBNAME)
@ePirat
ePirat / spec.md
Last active May 5, 2024 11:56
Icecast Protocol specification

Icecast protocol specification

What is the Icecast protocol?

When speaking of the Icecast protocol here, actually it's just the HTTP protocol, and this document will explain further how source clients need to send data to Icecast.

HTTP PUT based protocol

Since Icecast version 2.4.0 there is support for the standard HTTP PUT method. The mountpoint to which to send the data is specified by the URL path.

@jangeador
jangeador / get_or_create.py
Last active December 6, 2023 04:57
A function that creates unique objects based on models
def get_or_create(session, model, **kwargs):
'''
Creates an object or returns the object if exists
credit to Kevin @ StackOverflow
from: http://stackoverflow.com/questions/2546207/does-sqlalchemy-have-an-equivalent-of-djangos-get-or-create
'''
instance = session.query(model).filter_by(**kwargs).first()
if instance:
return instance
else:
@Jelby-John
Jelby-John / glyphicons.files.css
Last active December 22, 2017 15:02
Glyphicons Pro in Twitter Bootstrap 3
@font-face { font-family: 'Glyphicons files'; src: url('../fonts/glyphicons-filetypes-regular.eot'); src: url('../fonts/glyphicons-filetypes-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-filetypes-regular.woff') format('woff'), url('../fonts/glyphicons-filetypes-regular.ttf') format('truetype'), url('../fonts/glyphicons-filetypes-regular.svg#glyphicons-filetypes-regular') format('svg'); } .glyphfiles { position: relative; top: 1px; display: inline-block; font-family: 'Glyphicons files'; font-style: normal; font-weight: normal; line-height: 1; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }.glyphfiles-txt:before {content: "\e001"; }.glyphfiles-doc:before {content: "\e002"; }.glyphfiles-rtf:before {content: "\e003"; }.glyphfiles-log:before {content: "\e004"; }.glyphfiles-tex:before {content: "\e005"; }.glyphfiles-msg:before {content: "\e006"; }.glyphfiles-text:before {content: "\e007"; }.glyphfiles-wpd:before {content: "\e008"; }.glyphfiles-wps:before {con
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active May 5, 2024 18:31
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@ghalimi
ghalimi / PV.js
Created January 25, 2013 23:27
PV Function
// Copyright (c) 2012 Sutoiku, Inc. (MIT License)
function PV(rate, periods, payment, future, type) {
// Initialize type
var type = (typeof type === 'undefined') ? 0 : type;
// Evaluate rate and periods (TODO: replace with secure expression evaluator)
rate = eval(rate);
periods = eval(periods);
@jzempel
jzempel / application:__init__.py
Created July 29, 2012 20:37
Flask with Celery 3.0
from blueprint import example
from extensions import mail
from flask import Flask
import settings
def create_app(settings=settings):
ret_val = Flask(__name__)
ret_val.config.from_object(settings)
# initialize extensions...