Skip to content

Instantly share code, notes, and snippets.

View syl20bnr's full-sized avatar
🎹
♬♩♪·♫ ​​​​​​​​​​♬♩♪ ♪·♫ ♬♩

Sylvain Benner syl20bnr

🎹
♬♩♪·♫ ​​​​​​​​​​♬♩♪ ♪·♫ ♬♩
  • Tracel AI
  • Quebec City, Canada
  • 04:27 (UTC -04:00)
View GitHub Profile
@syl20bnr
syl20bnr / benchmarks.json
Last active January 12, 2024 14:48
Burn backend comparison benchmark serialization example
{
"backend": "fusion<wgpu>",
"device": "BestAvailable",
"gitHash": "7a8bc990cc257c51d6a8dc449c13353f931e8081",
"max": 2844,
"mean": 2783,
"median": 2776,
"min": 2757,
"name": "matmul",
"numRepeats": 3,
Wed Apr 12 18:04:14 UTC 2017
@syl20bnr
syl20bnr / pedantically_commented_playbook.yml
Created December 15, 2016 14:12 — forked from phred/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.
@syl20bnr
syl20bnr / build-emacs.sh
Created January 6, 2016 20:22 — forked from favadi/build-emacs.sh
Compile latest emacs version (24.5) in Ubuntu 14.04
#!/bin/bash
# Build latest version of Emacs, version management with stow
# OS: Ubuntu 14.04 LTS
# version: 24.5
# Toolkit: lucid
# Warning, use updated version of this script in: https://github.com/favadi/build-emacs
set -e

Spacemacs can be interfaced with different search utilities like:

The search commands in Spacemacs are organized under the SPC s prefix with the next key is the tool to use and the last key is the scope. For instance SPC s a b will search in all opened buffers using ag. If the last key (determining the scope) is uppercase then the current region

@syl20bnr
syl20bnr / .spacemacs.el
Last active January 22, 2019 20:56
Add cuda-mode in Spacemacs
(defun dotspacemacs/layers ()
"Configuration Layers declaration."
(setq-default
;; ...
;; List of additional packages that will be installed wihout being
;; wrapped in a layer. If you need some configuration for these
;; packages then consider to create a layer, you can also put the
;; configuration in `dotspacemacs/config'.
dotspacemacs-additional-packages '(cuda-mode)
;; ...
;;; spacemacs-mode-test.el --- Spacemacs Functional Test File
;;
;; Copyright (c) 2012-2014 Sylvain Benner
;; Copyright (c) 2014-2015 Alberto Zaccagni & Contributors
;;
;; Author: Alberto Zaccagni <email>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
(defvar multiple-cursors-packages
'(
multiple-cursors
)
"List of all packages to install and/or initialize. Built-in packages
which require an initialization must be listed explicitly in the list.")
(defvar multiple-cursors/init-multiple-cursors ()
(use-package multiple-cursors
:init
@syl20bnr
syl20bnr / .pdbrc
Created October 8, 2014 17:39
Pretty print object in pdb
# Print a dictionary, sorted. %1 is the dict, %2 is the prefix for the names.
alias p_ for k in sorted(%1.keys()):print"%s%-15s= %-80.80s"%("%2",k,repr(%1[k]))
# Print the instance variables of a thing.
alias pi p_ %1.__dict__ %1.
# Print the instance variables of self.
alias ps pi self
# Print the locals.
alias pl p_ locals()local:
# Next and list, and step and list.
alias nl n;;l
# All of these examples are valid PEP-8
# Example #1
a = "a very long string with a lot of characters, more than the common 80 CPL limit."
# can be easily reformatted with parenthesis:
a = ("a very long string with a lot of characters, "
"more than the common 80 CPL limit.")