Skip to content

Instantly share code, notes, and snippets.

View arthur-s's full-sized avatar
🏠
Working from home

Arthur arthur-s

🏠
Working from home
View GitHub Profile
@esmitt
esmitt / transparency_glfw.cpp
Created June 4, 2021 15:09
Main file to create a transparency window + transparency framebuffer using GLFW. This sample only draws a rotating rectangle.
#include <windows.h>
#include <GLFW/glfw3.h>
#include <iostream>
// change this to int main() to allow the console
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, char*, int nShowCmd)
{
GLFWwindow* window;
int windowSizeW = 640, windowSizeH = 480;
// initialize the library
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@swlaschin
swlaschin / effective-fsharp.md
Last active March 8, 2024 03:10
Effective F#, tips and tricks

Architecture

  • Use Onion architecture

    • Dependencies go inwards. That is, the Core domain doesn't know about outside layers
  • Use pipeline model to implement workflows/use-cases/stories

    • Business logic makes decisions
    • IO does storage with minimal logic
    • Keep Business logic and IO separate
  • Keep IO at edges

@snakers4
snakers4 / process_wikipedia.py
Last active January 4, 2023 22:19
Post process wikipedia files produced by wikiextractor
import os
import re
import sys
import glob
import nltk
import gensim
import numpy as np
import pandas as pd
from tqdm import tqdm
from uuid import uuid4
@jeromecoupe
jeromecoupe / webstoemp-gulpfile.js
Last active January 21, 2024 16:28
Gulp 4 sample gulpfile.js. For a full explanation, have a look at https://www.webstoemp.com/blog/switching-to-gulp4/
"use strict";
// Load plugins
const autoprefixer = require("autoprefixer");
const browsersync = require("browser-sync").create();
const cp = require("child_process");
const cssnano = require("cssnano");
const del = require("del");
const eslint = require("gulp-eslint");
const gulp = require("gulp");
@netsmertia
netsmertia / main.dart
Created May 4, 2018 13:53
flutter image drawing in canvas
import 'package:flutter/material.dart';
import 'dart:ui' as ui;
import 'package:flutter/services.dart' show rootBundle;
import 'dart:async';
import 'dart:typed_data';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@shoogle
shoogle / qt-without-xcode.md
Last active April 30, 2024 16:45
Qt without XCode - how to use Qt Creator for macOS software development without installing XCode

Qt without Xcode

How to use Qt Creator for software development on macOS without having to install Xcode

Justification

Qt refuses to install on macOS unless Apple's Xcode is installed beforehand. This is unfortunate because:

@onechiporenko
onechiporenko / components.expand-all-toggle.js
Last active November 13, 2020 02:06
Ember Models Table with Semantic UI
import Ember from 'ember';
export default Ember.Component.extend({
actions: {
collapseAllRows() {
Ember.get(this, 'collapseAllRows')();
},
expandAllRows() {
Ember.get(this, 'expandAllRows')();
}
@tuxmartin
tuxmartin / README.md
Last active January 5, 2022 20:34
Minimal Poco websocket C++ client

Stazeni a kompilace POCO

wget http://pocoproject.org/releases/poco-1.7.3/poco-1.7.3.tar.gz
tar xzf poco-1.7.3.tar.gz
cd poco-1.7.3
./configure --minimal --static --no-samples --no-tests
time make -j4 -s
cd lib/Linux/x86_64/
for f in *.a; do "strip $f"; done
sudo yum -y install gcc gcc-c++ glibc-devel make ncurses-devel openssl-devel autoconf java-1.8.0-openjdk-devel git
sudo yum -y install wxBase.x86_64
sudo yum -y install wget
wget http://packages.erlang-solutions.com/erlang-solutions-1.0-1.noarch.rpm
sudo rpm -Uvh erlang-solutions-1.0-1.noarch.rpm
sudo yum -y install esl-erlang
sudo mkdir /opt/elixir
sudo git clone https://github.com/elixir-lang/elixir.git /opt/elixir
cd /opt/elixir
sudo make clean test