Skip to content

Instantly share code, notes, and snippets.

View xav-ie's full-sized avatar
👁👅👁

Xavier Ruiz xav-ie

👁👅👁
View GitHub Profile
{
description = "runme application";
inputs = {
nixpkgs.url = "nixpkgs"; # Resolves to github:NixOS/nixpkgs
# Helpers for system-specific outputs
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
@samwhitlock
samwhitlock / auto-revert.el
Created December 3, 2020 07:56
Simple way to auto-revert in dired
(defun quiet-auto-revert ()
"A hook to run for buffers you want to revert automatically and silently"
(auto-revert-mode 1)
(setq-local auto-revert-verbose nil))
;; you can also make auto-revert-verbose nil globally, but I like to avoid global changes if I can
(add-hook 'dired-mode-hook #'quiet-auto-revert t nil)
;; you can add this to any other mode's hook, as it will be compatible
@jsks
jsks / retina.patch
Created January 3, 2019 15:45
YAMAMOTO Mitsuharu's patch for pdf-tools on MacOS https://lists.gnu.org/archive/html/emacs-devel/2016-04/msg00648.html
diff --git a/lisp/pdf-annot.el b/lisp/pdf-annot.el
index b0ff3c2..82cf122 100644
--- a/lisp/pdf-annot.el
+++ b/lisp/pdf-annot.el
@@ -981,6 +981,7 @@ other annotations."
(pdf-cache-renderpage-highlight
page (car size)
`("white" "steel blue" 0.35 ,@edges))
+ :width (car size)
:map (pdf-view-apply-hotspot-functions
@deargle
deargle / tokenize.py
Last active April 22, 2021 12:32
Example of TfidfVectorizer with custom tokenizer that does basic stemming
# -*- coding: utf-8 -*-
"""
Created on Tue Apr 24 16:30:42 2018
@author: deargle
"""
from sklearn.feature_extraction.text import TfidfVectorizer
from nltk.stem.porter import PorterStemmer
import nltk
@KdotJPG
KdotJPG / OpenSimplex2S.java
Last active May 22, 2024 23:03
Visually isotropic coherent noise algorithm based on alternate constructions of the A* lattice.
/**
* K.jpg's OpenSimplex 2, smooth variant ("SuperSimplex")
*
* More language ports, as well as legacy 2014 OpenSimplex, can be found here:
* https://github.com/KdotJPG/OpenSimplex2
*/
public class OpenSimplex2S {
private static final long PRIME_X = 0x5205402B9270C86FL;