Skip to content

Instantly share code, notes, and snippets.

View drlinux's full-sized avatar
🤘
I may be slow to respond.

Ibrahim YILMAZ drlinux

🤘
I may be slow to respond.
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<title>Building JSON-LD APIs: Best Practices</title>
<meta charset='utf-8'>
<script class="remove" src="local-biblio.js"></script>
<script src='https://www.w3.org/Tools/respec/respec-w3c-common'
async class='remove'></script>
<script class='remove'>
var respecConfig = {
@drlinux
drlinux / correct_audio_loudness.sh
Created April 19, 2022 15:50 — forked from hdsdi3g/correct_audio_loudness.sh
Apply a loudness correction for a video file with ffmpeg and libebur128, without re-transcoding the video stream
#!/bin/sh
# This script needs ffmpeg v3.2 (--enable-libebur128) + jq
SOURCE=$1;
JSON_ANALYST_FILE="$SOURCE.json"
DEST_I="-23"
DEST_LRA="15"
DEST_TRUE_PEAK="-3"
@drlinux
drlinux / loudness.rb
Created February 14, 2022 15:02 — forked from kylophone/loudness.rb
FFmpeg loudnorm filter - dual pass loudness normalization example - http://k.ylo.ph/2016/04/04/loudnorm.html
#!/usr/bin/env ruby
require 'open3'
require 'json'
ffmpeg_bin = '/usr/local/bin/ffmpeg'
target_il = -24.0
target_lra = +11.0
target_tp = -2.0
samplerate = '48k'
@drlinux
drlinux / INSTALL.md
Last active June 4, 2020 19:34 — forked from takeit/INSTALL.md
Write to NTFS on macOS Sierra (osxfuse + ntfs-3g)
  1. Install osxfuse:
brew cask install osxfuse
  1. Reboot your Mac.

  2. Install ntfs-3g:

@drlinux
drlinux / libxl-php-install.sh
Created February 1, 2020 12:14 — forked from archy-bold/libxl-php-install.sh
Install LibXL for PHP
#!/bin/sh
# Ensure we've got libxml2
apt-get update
apt-get install libxml2-dev
# Make /src directory, if required
mkdir /src
cd /src
@drlinux
drlinux / wkhtmltopdf.sh
Created January 29, 2020 08:38 — forked from Rajeshr34/wkhtmltopdf.sh
Wkhtmltopdf With Patched QT Setup Ubuntu 16+
cd ~
apt-get install libfontenc1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils openssl build-essential libssl-dev libxrender-dev git-core libx11-dev libxext-dev libfontconfig1-dev libfreetype6-dev fontconfig -y
#https://github.com/wkhtmltopdf/wkhtmltopdf/releases
#replace arch
wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb
dpkg -i wkhtmltox_0.12.5-1.bionic_amd64.deb
apt --fix-broken install
@drlinux
drlinux / 1_triggers.sql
Created November 11, 2019 13:00 — forked from fritzy/1_triggers.sql
Get table change notifications from Postgres as JSON
CREATE OR REPLACE FUNCTION table_update_notify() RETURNS trigger AS $$
DECLARE
id bigint;
BEGIN
IF TG_OP = 'INSERT' OR TG_OP = 'UPDATE' THEN
id = NEW.id;
ELSE
id = OLD.id;
END IF;
PERFORM pg_notify('table_update', json_build_object('table', TG_TABLE_NAME, 'id', id, 'type', TG_OP)::text);
### Keybase proof
I hereby claim:
* I am drlinux on github.
* I am drlinux (https://keybase.io/drlinux) on keybase.
* I have a public key ASB_03p2zPyRqB88NEfYaMGqX2bpR0wUM55DVNIrGcySdQo
To claim this, I am signing this object:
@drlinux
drlinux / samlparser.py
Last active March 4, 2019 07:52 — forked from dingus9/samlparser.py
Python SAML parser and validator
from base64 import b64decode
from defusedxml.lxml import fromstring
from signxml import xmldsig
class SAMLParser(object):
def __init__(self, rawresp):
self.b64 = rawresp
@drlinux
drlinux / guardduty_to_acl_lambda.py
Created January 17, 2019 13:35
GuardDutyで検知したIPをDynamodbに格納後、WAFに登録しブロックする
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# MIT No Attribution
# 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.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,