Skip to content

Instantly share code, notes, and snippets.

View robertodr's full-sized avatar
🤡
Clowning around

Roberto Di Remigio Eikås robertodr

🤡
Clowning around
View GitHub Profile
@rnag
rnag / metaclasses.py
Last active May 29, 2024 05:08
Field Property Support in Dataclasses, for Python 3.7+
from __future__ import annotations
import builtins
from collections import deque
from dataclasses import field as dataclass_field, Field, MISSING
from logging import getLogger
log = getLogger(__name__)
@myobie
myobie / ci.yml
Last active September 20, 2023 09:26
Don't run GitHub Actions for pull requests that are drafts
on:
push:
branches:
- master
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
@ohmeqwertreysd
ohmeqwertreysd / polybar.conf
Created July 25, 2020 07:36 — forked from onimenotsuki/polybar.conf
Polybar configuration for two displays
[colors]
accent = #fba922
[bar/top]
enable-ipc = true
monitor = LVDS
width = 100%
height = 27
;background = #222
@durbon
durbon / Template-Developer-Survey.md
Last active June 9, 2023 11:58
Este listado de temas cubre un amplio abanico de asuntos que nos interesa evaluar dentro del equipo https://medium.com/@durbon/developer-survey-recopilando-la-opini%C3%B3n-de-los-desarrolladores-76384a0347bb

1. Development environment

  • How would you rate the development environment in team? (Use the [1-5] scale)
  • How would you rate the project Settings needed to start to work? (Use the [1-5] scale)
  • How would you rate documentation of the necessary tools? (Use the [1-5] scale)
  • How do you rate the team’s current onboarding process? (Use the [1-5] scale)
  • Do you think we have enough tools to work with? (Use the [1-5] scale)
  • What tools are you missing in order to be more productive at work?

2. Code

  • What is the level of satisfaction with the current codebase? (Use the [1-5] scale)
@dshoreman
dshoreman / slurp.md
Last active July 1, 2024 12:19
Swaymsg commands for listing windows and outputs

i3

Get Active Window ID

xdotool getactivewindow

Get Current Desktop ID

xdotool get_desktop_for_window "$(xdotool getactivewindow)"
@bast
bast / bootable-usb.sh
Last active January 10, 2020 09:50
Create bootable USB from command line.
# adapted from https://web.archive.org/web/20190522110737/https://antergos.com/wiki/uncategorized/create-a-working-live-usb/
# first find out the device of your usb
sudo fdisk -l
# now that you know the letter, replace the "X" below
# typically "X" is replaced by "b" or "c" but it can be different on your system
# make sure it's not the device of your hard drive, otherwise you wipe it
sudo dd bs=4M if=/path/to/image.iso of=/dev/sdX status=progress
sync
@GeorgeWeb
GeorgeWeb / sycl_dev_profile.hpp
Last active April 18, 2022 11:55
Simple example of a 'SYCL profiling' wrapper class for kernels running on a device with OpenCL support
#include <chrono>
#include <vector>
#include <CL/sycl.hpp>
namespace sycl = cl::sycl;
using wall_clock_t = std::chrono::high_resolution_clock;
using time_point_t = std::chrono::time_point<wall_clock_t>;
template <typename T, class Period>
using time_interval_t = std::chrono::duration<T, Period>;
@mgoldey
mgoldey / mkl.dockerfile
Created August 6, 2018 19:52
install basic mkl libraries in debian docker image
# install mkl
RUN apt update && apt install -y --force-yes apt-transport-https && \
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB && \
apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB && \
sh -c 'echo deb https://apt.repos.intel.com/mkl all main > /etc/apt/sources.list.d/intel-mkl.list' && \
apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install cpio intel-mkl-64bit-2018.3-051 && \
(find /opt/intel -name "ia32*" -exec rm -rf {} \; || echo "removing ia32 binaries") ; \
(find /opt/intel -name "examples" -type d -exec rm -rf {} \; || echo "removing examples") ; \
(find /opt/intel -name "benchmarks" -exec rm -rf {} \; || echo "removing benchmarks") ; \
(find /opt/intel -name "documentation*" -exec rm -rf {} \; || echo "removing documentation") ; \
@project-tuva
project-tuva / MPIFileHandler.py
Created July 23, 2018 21:14
logging with mpi4py
# -*- coding: utf-8 -*-
"""
Created on Wed Feb 14 16:17:38 2018
This handler is used to deal with logging with mpi4py in Python3.
@author: cheng
@reference:
https://cvw.cac.cornell.edu/python/logging
https://groups.google.com/forum/#!topic/mpi4py/SaNzc8bdj6U
@bast
bast / delete-appveyor-cache.sh
Created July 20, 2018 14:40
Delete Appveyor cache using curl.
#!/usr/bin/env bash
# adjust APPVEYOR_TOKEN, username, and projectname
APPVEYOR_TOKEN=....................
curl -H "Authorization: Bearer $APPVEYOR_TOKEN" \
-H "Content-Type: application/json" \
-X "DELETE" \
https://ci.appveyor.com/api/projects/username/projectname/buildcache