Skip to content

Instantly share code, notes, and snippets.

View Akaame's full-sized avatar

Sıddık AÇIL Akaame

  • München
View GitHub Profile
@kconner
kconner / macOS Internals.md
Last active July 2, 2025 14:28
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@yhatt
yhatt / marp.md
Last active May 7, 2025 17:23
Marp Next example
marp

Marp

h:250

Markdown presentation ecosystem
@thrawn01
thrawn01 / main.go
Created December 3, 2018 20:34
etcd `concurrency.Election` example with connection interruption detection and initial leadership status reporting
package main
import (
"context"
"fmt"
"os"
"os/signal"
"syscall"
"time"
@Toparvion
Toparvion / HOWTO.md
Last active April 29, 2025 08:54
JUnit test for conditional Spring Boot bean registration (@ConditionalOnProperty)

Problem

Suppose you have two classes that should be registered with Spring context exclusively, e.g. only one of the beans must exist in the context at any time based on some boolean property value. Of course you can do it by adding explicit if condition into your @Configuration class. But if the classes have no common interface it may be quite cumbersome. As an alternative you can use @ConditionalOnProperty annotation on your classes, e.g.:

@Service
@ConditionalOnProperty(name = "use-left-service", havingValue = "true", matchIfMissing = false)
public class LeftService
@graninas
graninas / cpp_stm_free_tutorial.md
Last active June 9, 2025 12:16
Software Transactional Memory in C++: Pure Functional Approach (tutorial)

Software Transactional Memory in C++: pure functional approach (Tutorial)

In this article I’ll tell you about my pure functional library for Software Transactional Memory (STM) that I’ve built in C++. I adopted some advanced functional programming concepts that make it composable and convenient to use. Its implementation is rather small and robust, which differentiates the library from competitors. Let’s discuss what STM is and how to use it.

@merikan
merikan / Jenkinsfile
Last active June 7, 2025 23:07
Some Jenkinsfile examples
Some Jenkinsfile examples
@affo
affo / 2pc.py
Created October 17, 2016 11:06
Implementation of 2 Phase Commit protocol
'''
Implementation of 2 Phase Commit as explained at Wikipedia:
https://en.wikipedia.org/wiki/Two-phase_commit_protocol
'''
import random, logging, time
from threading import Thread, Semaphore, Lock
_fmt = '%(user)s:%(levelname)s >>> %(message)s'
logging.basicConfig(format=_fmt)
LOG = logging.getLogger(__name__)
@ShigekiKarita
ShigekiKarita / TEST result
Last active November 15, 2021 23:28
Convolutional-Pooling Computing in OpenCL
[==========] Running 3 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 3 tests from CNN
[ RUN ] CNN.PropConv
[ OK ] CNN.PropConv (59 ms)
[ RUN ] CNN.PropPool
[ OK ] CNN.PropPool (0 ms)
[ RUN ] CNN.PropPoolRandom
[ OK ] CNN.PropPoolRandom (4 ms)
[----------] 3 tests from CNN (63 ms total)
@iikuy
iikuy / gist:8115191
Last active March 18, 2024 19:55
producer-consumer in C++11
#include <thread>
#include <iostream>
#include <queue>
std::mutex mx;
std::condition_variable cv;
std::queue<int> q;
bool finished = false;
@tibordp
tibordp / variant.cc
Last active July 7, 2025 07:31
A simple variant type implementation in C++
#include <iostream>
#include <utility>
#include <typeinfo>
#include <type_traits>
#include <string>
template <size_t arg1, size_t ... others>
struct static_max;
template <size_t arg>