Skip to content

Instantly share code, notes, and snippets.

View amanusk's full-sized avatar
😘
Training ... Unit ready

amanusk amanusk

😘
Training ... Unit ready
View GitHub Profile
@amanusk
amanusk / cairo.vim
Last active April 14, 2023 02:52
Cairo 1.0 Syntax highligh for vim
" Vim syntax file
"
" Language: CAIRO
if exists("b:current_syntax")
finish
endif
syntax include @python syntax/python.vim
@amanusk
amanusk / cairo_vim_env.md
Last active February 20, 2023 13:51
Cairo Env for Vim

Setting up Cairo env for vim development

Setup the cairo virtualenv

First things first, you need to install the cairo-lang package, preferably in a virtual env you can later use and upgrade. Currently only python 3.7 and 3.8 is supported

python3 -m venv ~/cairo_venv
source ~/cairo_venv/bin/activate
@amanusk
amanusk / display.sh
Last active August 7, 2023 01:46
Easily change between laptop and external displays in i3 + dmenu
#!/bin/bash
# This script is intended to make switching between laptop and external displays easier when using i3+dmenu
# To run this script, map it to some shortcut in your i3 config, e.g:
# bindsym $mod+p exec --no-startup-id $config/display.sh
@amanusk
amanusk / spectre.c
Created January 8, 2018 19:37 — forked from ErikAugust/spectre.c
Spectre example code
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#ifdef _MSC_VER
#include <intrin.h> /* for rdtscp and clflush */
#pragma optimize("gt",on)
#else
#include <x86intrin.h> /* for rdtscp and clflush */
#endif