Skip to content

Instantly share code, notes, and snippets.

View derblub's full-sized avatar
✌️
I might be interested in cooperation.

Daniel Kurdoghlian derblub

✌️
I might be interested in cooperation.
View GitHub Profile
A Python script that utilizes the OpenAI API to generate Python code based on user prompts, execute the generated code, check for errors, and suggest new features while ensuring their correctness.
@derblub
derblub / TrueNas12.xSetup.md
Created July 24, 2022 10:18 — forked from cadavor/TrueNas12.xSetup.md
Ultimate TrueNas 12 Setup Guide

TrueNAS 12.x

WARNING READ THIS: This page contains incomplete and possibly incorrect info. The page is constantly being edited and worked on. Many of these should work but some may be broken. Read the code carefully to understand what you are doing, stuff may be need to be changed for your own use. These include but are not limited too JAIL AND ROUTER IPs, YOUR FREENAS MAIN VOLUME,THE MOST RECENT RELEASE OF DOWNLOADED FILES. Use at your own risk.

Thanks to the creator of this guide https://forums.freenas.org/index.php?resources/fn11-1-iocage-jails-plex-tautulli-sonarr-radarr-lidarr-jackett-ombi-transmission-organizr.58/

Setup Structure

@derblub
derblub / celery.sh
Created August 26, 2020 16:53 — forked from amatellanes/celery.sh
Celery handy commands
/* Useful celery config.
app = Celery('tasks',
broker='redis://localhost:6379',
backend='redis://localhost:6379')
app.conf.update(
CELERY_TASK_RESULT_EXPIRES=3600,
CELERY_QUEUES=(
Queue('default', routing_key='tasks.#'),
@derblub
derblub / gopro_hevc_to_dnxhd.sh
Created June 21, 2020 11:03 — forked from ncoder-1/gopro_hevc_to_dnxhd.sh
Convert GoPro Hero7/Hero8 videos (mainly HEVC) to DNxHD and AAC to PCM which can be read with DaVinci Resolve 16 in Linux
#!/usr/bin/env bash
#
# Convert GoPro Hero7/Hero8 videos (mainly HEVC) to DNxHD and AAC to PCM which can be read with DaVinci Resolve 16 in Linux
# Also keeps GoPro's metadata
#
# Required dependency: ffmpeg 4.1
# To do: per-stream error handling, actually use datastream count and more efficient parsing of ffprobe
#
# Free for the taking.
#
(function( $ ) {
$.fn.readOnlySuffix = function(suffix) {
return this.each(function() {
var $this = $(this),
suffixLength = suffix.length,
oldValue = suffix,
mouseIsDown = false;
// Must be a text input or text area
if (!($this.is(":text") || $this.tagName.toLowerCase() == "textarea")){
@derblub
derblub / django-schema_inspectdb-changes
Created April 23, 2019 06:28 — forked from cbess/django-schema_inspectdb-changes
django 1.3 postgresql schema (search path) fix for inspectdb and db connection
= Modify: django.core.management.commands.inspectdb
- line 33, add
- cursor.execute("SET search_path TO myschema")
- line 80, change to
- field_type = 'ForeignKey(\'%s\'' % rel_to
- now you can ignore the model ordering
= Modify: django.db.backends.postgres_psycopg2.base
- line 147, add
- cursor.execute("SET search_path TO myschema")
@derblub
derblub / gist:240469a97c5ebd19194db4963c52c1d2
Created March 10, 2019 19:10 — forked from ctrl-freak/gist:9abb5aea0d89d7bd9df6a3d0ac08b73c
Android ADB `adb shell input keyevent` Codes
// http://stackoverflow.com/questions/7789826/adb-shell-input-events
0 --> "KEYCODE_0"
1 --> "KEYCODE_SOFT_LEFT"
2 --> "KEYCODE_SOFT_RIGHT"
3 --> "KEYCODE_HOME"
4 --> "KEYCODE_BACK"
5 --> "KEYCODE_CALL"
6 --> "KEYCODE_ENDCALL"
7 --> "KEYCODE_0"
@derblub
derblub / md-renderer.conf
Created February 11, 2019 19:15 — forked from max-lt/md-renderer.conf
Nginx config to render markdown files (client side)
location /__special {
internal;
allow all;
root /usr/share/nginx/html/__special;
}
location = /__md_file {
internal;
allow all;
@derblub
derblub / -
Last active January 12, 2019 20:41 — forked from anonymous/-
#!/usr/bin/env python
# select a colour with wxPython's
# wx.ColourDialog(parent, data)
# source: Dietrich 20nov2008
# Description: Python color wheel.
import wx
class MyPanel(wx.Panel):
def __init__(self, parent):
wx.Panel.__init__(self, parent, wx.ID_ANY)
@derblub
derblub / install_nginx_vim.sh
Created December 1, 2018 14:02 — forked from 2called-chaos/install_nginx_vim.sh
enable nginx vim syntax highlighting (on Ubuntu/Debian)
#!/bin/sh
mkdir -p ~/.vim/syntax/
cd ~/.vim/syntax/
wget http://www.vim.org/scripts/download_script.php?src_id=19394
mv download_script.php\?src_id\=19394 nginx.vim
cat > ~/.vim/filetype.vim <<EOF
au BufRead,BufNewFile /etc/nginx/*,/usr/local/nginx/conf/* if &ft == '' | setfiletype nginx | endif
EOF