Skip to content

Instantly share code, notes, and snippets.

View roma-guru's full-sized avatar
🌴
In Cyprus

Roman Voropaev roma-guru

🌴
In Cyprus
View GitHub Profile
@RamseyK
RamseyK / dyld_image_list.c
Last active December 25, 2020 12:44
Example code for retrieving loaded libraries using functions in dyld.h
#include <mach-o/dyld.h>
char *target_image_name = "libdyld";
const struct mach_header* target_mach_header = NULL;
const char *image_name = NULL;
int num_images = _dyld_image_count();
printf("%i images loaded\n", num_images);
for (int i = 0; i < num_images; i++) {
@brandonwillard
brandonwillard / .pdbrc
Last active April 29, 2020 00:12
A `.pdbrc` that enables IPython's pretty printing in `[i]pdb`
#
# Make `pp` use IPython's pretty printer, instead of the standard `pprint` module.
#
# Sources: https://nedbatchelder.com/blog/200704/my_pdbrc.html
#
# XXX: This .pdbrc is only valid for Python >= 3.4
#
import pdb
import inspect as __inspect
from pprint import pprint as __pprint
@hzhan147
hzhan147 / install-cudnn.sh
Created March 15, 2019 07:16
Install CUDNN for CUDA 10.1
#Download deb file from :
# https://developer.nvidia.com/compute/machine-learning/cudnn/secure/v7.5.0.56/prod/10.1_20190225/Ubuntu14_04-x64/libcudnn7_7.5.0.56-1%2Bcuda10.1_amd64.deb
# https://developer.nvidia.com/compute/machine-learning/cudnn/secure/v7.5.0.56/prod/10.1_20190225/Ubuntu14_04-x64/libcudnn7-dev_7.5.0.56-1%2Bcuda10.1_amd64.deb
sudo dpkg -i libcudnn7_7.5.0.56-1+cuda10.1_amd64.deb
sudo dpkg -i libcudnn7-dev_7.5.0.56-1+cuda10.1_amd64.deb
@jbaranski
jbaranski / ffmpeg_mac_m1_record_cmd_line.md
Last active March 11, 2025 04:02
ffmpeg record screen on Mac M1 chip via command line

ffmpeg record screen on Mac M1 chip via command line

  1. Install ffmpeg.

brew install ffmpeg

  1. Figure out which device to use.

ffmpeg -f avfoundation -list_devices true -i ""

Ouput will look like:

@madskjeldgaard
madskjeldgaard / supercollider2live.scd
Last active November 28, 2024 09:44
SuperCollider to Ableton Live setup
/*
This small patch is an example of how to nicely send midi to Ableton Live from SuperCollider.
It includes how to set up Ableton Link (don't forget to press the "LINK" button in Live) and play a pattern using Link and midi.
It is assumed that you do this on MacOS and you have created a midi driver called "IAC Driver".
*/
(