Skip to content

Instantly share code, notes, and snippets.

@alitavakol
alitavakol / simplest_player.c
Created September 23, 2023 07:41 — forked from mashingan/simplest_player.c
Simplest example of creating player using FFMpeg and SDL2. Currently with choppy audio playing.
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <time.h>
#include <windows.h>
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
//#include <libavutil/frame.h>
#include <SDL2/SDL.h>
@alitavakol
alitavakol / .prettierrc.json
Created April 9, 2023 11:41
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.6.4+commit.1dca32f3.js&optimize=false&runs=200&gist=
{
"overrides": [
{
"files": "*.sol",
"options": {
"printWidth": 80,
"tabWidth": 4,
"useTabs": false,
"singleQuote": false,
"bracketSpacing": false
@alitavakol
alitavakol / utf-16_encoder.cpp
Created September 15, 2019 07:44 — forked from bcachet/utf-16_encoder.cpp
Convert string to wstring to write to file with utf-16 encoding
// Windows version
#include <string>
#include <iostream>
#include <fstream>
#include <locale>
#include <codecvt>
#include <Windows.h>
std::wstring decode(const std::string &str, int codePage = GetACP())
{
@alitavakol
alitavakol / widget_base.ui
Created August 25, 2019 10:11
My Qt OpenGL Waveform Plot Widget
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Form</class>
<widget class="QWidget" name="Form">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>792</width>
<height>498</height>