Skip to content

Instantly share code, notes, and snippets.

View chatziko's full-sized avatar

Kostas Chatzikokolakis chatziko

View GitHub Profile
@GaelVaroquaux
GaelVaroquaux / 00README.rst
Last active September 15, 2023 03:58
Copy-less bindings of C-generated arrays with Cython

Cython example of exposing C-computed arrays in Python without data copies

The goal of this example is to show how an existing C codebase for numerical computing (here c_code.c) can be wrapped in Cython to be exposed in Python.

The meat of the example is that the data is allocated in C, but exposed in Python without a copy using the PyArray_SimpleNewFromData numpy

@kraih
kraih / Coro.pm
Last active April 19, 2019 13:48
package Mojolicious::Plugin::Coro;
use Mojo::Base 'Mojolicious::Plugin';
use Coro;
use Mojo::IOLoop;
# Wrap application in coroutine and reschedule main coroutine in event loop
sub register {
my ($self, $app) = @_;
my $subscribers = $app->plugins->subscribers('around_dispatch');
@asksven
asksven / unison.md
Last active October 16, 2023 20:45
Configure unison for continuous sync

Configure unison for bi-directional sync

1. On client

  1. Create a profile (~/.unison/bidirsync.prf):
# Unison preferences
label = bi-directonal sync with server
root = /home/<user>/git
root = ssh://<user>@<server-name>//home/<user>/sync/git
sshargs = -oIdentityFile=/home/<user>/.ssh/<privkey-name>
@jgranick
jgranick / flashplayerdebugger.sh
Created March 2, 2019 00:25
Flash Player install script for Linux
#!/bin/sh
echo ""
echo "-----------------------------------"
echo " Installing Flash Debugger"
echo "-----------------------------------"
sudo echo ""
@avoidik
avoidik / README.md
Last active July 13, 2024 15:29
Migrate Raspberry Pi from SD to USB

Raspberry Pi from SD to USB

How to switch over from SD-card to USB-attached device (USB thumbstick, USB enclosed SSD or HDD, etc.) to have more durable storage option.

Steps

  1. Connect USB device to your RPI

  2. Make sure USB device visible by the system