Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Delete Boxes</title>
<style>
.box {
width: 100px;
height: 100px;
@windyinsc
windyinsc / vlc_ts_error_fix.md
Created March 19, 2017 00:12
Fix for VLC: ts error: libdvbpsi error (PSI decoder): TS duplicate

FIX FOR VLC ERROR BELOW

The following changes to VLC were successful in fixing all playback issues.

  • VLC Version 2.2.4 Weatherwax (Intel 64bit) on OS X 10.9

ISSUE:

ts error: libdvbpsi error (PSI decoder): TS duplicate (received 0, expected 1) for PID 0 ts error: libdvbpsi error (PSI decoder): TS duplicate (received 0, expected 1) for PID 4095

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Delete Boxes</title>
<style>
.box {
width: 100px;
height: 100px;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Delete Boxes</title>
<style>
.box {
width: 100px;
height: 100px;
@JcBernack
JcBernack / BigDecimal.cs
Last active May 13, 2024 05:33
BigDecimal
using System;
using System.Numerics;
namespace Common
{
/// <summary>
/// Arbitrary precision decimal.
/// All operations are exact, except for division. Division never determines more digits than the given precision.
/// Source: https://gist.github.com/JcBernack/0b4eef59ca97ee931a2f45542b9ff06d
/// Based on https://stackoverflow.com/a/4524254
@rjescobar
rjescobar / extend-trial-jetbrains-windows.bat
Created August 31, 2021 02:53
JetBrains IDE trial reset windows
REM Delete eval folder with licence key and options.xml which contains a reference to it
for %%I in ("WebStorm", "IntelliJ", "CLion", "Rider", "GoLand", "PhpStorm", "Resharper", "PyCharm") do (
for /d %%a in ("%USERPROFILE%\.%%I*") do (
rd /s /q "%%a/config/eval"
del /q "%%a\config\options\other.xml"
)
)
REM Delete registry key and jetbrains folder (not sure if needet but however)
rmdir /s /q "%APPDATA%\JetBrains"
@Vanchel
Vanchel / outlined_input_border.dart
Last active May 13, 2024 05:23
Border with label placed inside
import 'dart:math' as math;
import 'dart:ui';
import 'package:flutter/material.dart';
class OutlinedInputBorder extends InputBorder {
/// Creates a rounded rectangle outline border for an [InputDecorator].
///
/// If the [borderSide] parameter is [BorderSide.none], it will not draw a
/// border. However, it will still define a shape (which you can see if
class DataIdGenerator {
constructor() {
this.count = 0;
}
generateDataId() {
this.count++;
return this.formatDataId(this.count);
}
@sainipray
sainipray / filter.py
Created February 27, 2020 09:53
Custom Django rest framework Ordering Filter
from rest_framework.filters import OrderingFilter
class CustomOrderFilter(OrderingFilter):
allowed_custom_filters = ['user_city', 'user_country']
fields_related = {
'user_city': 'user__city__name', # ForeignKey Field lookup for ordering
'user_country': 'user__country__name'
}
def get_ordering(self, request, queryset, view):
@jeremychone
jeremychone / rust-xp-02-postgresql-sqlx.rs
Created May 11, 2021 05:48
Rust to PostgreSQL with SQLX | Rust By Example
#![allow(unused)] // silence unused warnings while exploring (to comment out)
use sqlx::postgres::{PgPoolOptions, PgRow};
use sqlx::{FromRow, Row};
// Youtube episode: https://youtu.be/VuVOyUbFSI0
// region: Section
// Start postgresql server docker image: