Skip to content

Instantly share code, notes, and snippets.

@eyecatchup
eyecatchup / git-commit-log-stats.md
Last active April 25, 2024 13:54
Some commands to get git commit log statistics for a repository on the command line.

git commit stats

Commands to get commit statistics for a Git repository from the command line -
using git log, git shortlog and friends.




@skjerns
skjerns / save_edf.py
Last active April 25, 2024 13:54
Save a mne.io.Raw object to EDF/EDF+/BDF/BDF+
# -*- coding: utf-8 -*-
"""
Created on Wed Dec 5 12:56:31 2018
@author: skjerns
Gist to save a mne.io.Raw object to an EDF file using pyEDFlib
(https://github.com/holgern/pyedflib)
Disclaimer:
- Saving your data this way will result in slight
loss of precision (magnitude +-1e-09).
- It is assumed that the data is presented in Volt (V),
@mfansler
mfansler / conda.txt
Last active April 25, 2024 13:53 — forked from dataprofessor/conda.txt
Installing mamba on Google Colab
#################################################################################
# INSTALL MAMBA ON GOOGLE COLAB
#################################################################################
! wget -O miniconda.sh https://repo.anaconda.com/miniconda/Miniconda3-py37_4.10.3-Linux-x86_64.sh
! chmod +x miniconda.sh
! bash ./miniconda.sh -b -f -p /usr/local
! rm miniconda.sh
! conda config --add channels conda-forge
! conda install -y mamba
! mamba update -qy --all
— Да?
— Алё!
— Да да?
— Ну как там с деньгами?
— А?
— Как с деньгами-то там?
— Чё с деньгами?
— Чё?
— Куда ты звонишь?
@mdgrs-mei
mdgrs-mei / TerminalSpinner.ps1
Created June 15, 2023 14:43
Show spinner on the Windows Terminal tabs for every command.
$global:originalPSConsoleHostReadLine = $function:global:PSConsoleHostReadLine
$global:originalPrompt = $function:global:Prompt
$function:global:PSConsoleHostReadLine = {
$startProgressIndicator = "`e]9;4;3;50`e\"
$command = $originalPSConsoleHostReadLine.Invoke()
$startProgressIndicator | Write-Host -NoNewLine
$command
}
@nailuj05
nailuj05 / GetOrAddComponent.cs
Last active April 25, 2024 13:46
A simple extension method for Unity C# this gets or adds a given Component. (SphereCollider coll = gameObject.GetOrAddComponent<SphereCollider>();)
public static class Extensions
{
public static T GetOrAddComponent<T>(this GameObject gameObject) where T : Component
{
if(gameObject.TryGetComponent<T>(out T t))
{
return t;
}
else
{
@iamandrewluca
iamandrewluca / request-picture-in-picture.js
Last active April 25, 2024 13:46
Request picture in picture on first found video that is playing #bookmarklet
javascript: void ((function() {
/* More bookmarklets at https://gist.github.com/iamandrewluca/61feacf07bc4f2f50e70f986c2e9b2d2 */
/** @type {NodeListOf<HTMLIFrameElement>} */
const iFrames = window.document.querySelectorAll('iframe');
console.log(`Found ${iFrames.length} iframes`);
/** @type {Document[]} */
const allDocuments = [
window.document,
@stefanbschneider
stefanbschneider / networking_datasets.md
Last active April 25, 2024 13:45
List of datasets related to networking. Useful for data-driven evaluation or machine learning approaches. Feel free to comment with updates.