This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #define _GNU_SOURCE | |
| #include <dlfcn.h> | |
| #include <fcntl.h> | |
| #include <stdarg.h> | |
| #include <string.h> | |
| // Target path of your FIFO | |
| static const char *FIFO_PATH = NULL; | |
| typedef int (*orig_openat_t)(int dirfd, const char *pathname, int flags, ...); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // fast_core_read.c | |
| #define _GNU_SOURCE | |
| #include <dlfcn.h> | |
| #include <sys/mman.h> | |
| #include <sys/stat.h> | |
| #include <unistd.h> | |
| #include <string.h> | |
| #include <stdio.h> | |
| #include <stdint.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # window renaming | |
| set -g @tmux-git-window-git-symbol "" # Default Git icon | |
| set -g @tmux-git-window-dirty "" # Uncommitted changes | |
| set -g @tmux-git-window-conflict "" # Merge conflicts | |
| set -g @tmux-git-window-stashed "" # Stashed changes | |
| set -g @tmux-git-window-ahead "" # Ahead of remote | |
| set -g @tmux-git-window-behind "" # Behind remote | |
| set -g @tmux-git-window-diverged "" # Diverged changes | |
| run-shell "tmux set-environment -g TMUX_GIT_SYMBOL '#{@tmux-git-window-git-symbol}'" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| git_symbol="#{TMUX_GIT_SYMBOL}" | |
| dirty_symbol="#{TMUX_GIT_DIRTY}" | |
| conflict_symbol="#{TMUX_GIT_CONFLICT}" | |
| stashed_symbol="#{TMUX_GIT_STASHED}" | |
| ahead_symbol="#{TMUX_GIT_AHEAD}" | |
| behind_symbol="#{TMUX_GIT_BEHIND}" | |
| diverged_symbol="#{TMUX_GIT_DIVERGED}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.concurrent.ConcurrentLinkedQueue | |
| import scala.annotation.tailrec | |
| import scala.concurrent.{ExecutionContext, Future, Promise} | |
| implicit val ec = ExecutionContext.global | |
| val data = Map( | |
| "getBff 1" -> 3, | |
| "getBff 2" -> 4, | |
| "getFN 1" -> "Harry", | |
| "getFN 2" -> "Biff", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| trait ViewTransformer[-A,+B] { | |
| def sequence(in: Iterable[A]) = transform(in.view).to(IterableFactory.toSpecific(in.iterableFactory)) | |
| def transform(v: View[A]): View[B] | |
| def map[C](f: B => C): ViewTransformer[A,C] = new ViewTransformerImpl[A,C,B](this) { | |
| override def transform(v: View[A]): View[C] = prev.transform(v).map(f) | |
| } | |
| def flatMap[C](f: B => IterableOnce[C]): ViewTransformer[A,C] = new ViewTransformerImpl[A,C,B](this) { | |
| override def transform(v: View[A]): View[C] = prev.transform(v).flatMap(f) | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {-# LANGUAGE RankNTypes #-} | |
| import Data.STRef | |
| import Data.Vector (fromList, toList, freeze, thaw) | |
| import Control.Monad | |
| import Data.Vector.Mutable (MVector, STVector, read, write, swap) | |
| import qualified Data.Vector as V (Vector, length) | |
| import Data.List (sortOn) | |
| import Prelude hiding (read) | |
| import GHC.ST |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (ns qaxl.core | |
| (:use clojure.walk clojure.pprint qaxl.cache) | |
| (:require [co.paralleluniverse.pulsar.async :as qa] | |
| [clojure.core.async :as a] | |
| [co.paralleluniverse.pulsar.core :as q] | |
| [clojure.test :refer [function?]] | |
| [co.paralleluniverse.fiber.httpkit.client :as hk] | |
| [co.paralleluniverse.pulsar.core :refer [fiber]] | |
| [clojure.core.match :refer [match]])) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;; La bella vita di quattro finestre | |
| (global-set-key "\C-col" 'windmove-left) | |
| (global-set-key "\C-cor" 'windmove-right) | |
| (global-set-key "\C-cou" 'windmove-up) | |
| (global-set-key "\C-cod" 'windmove-down) | |
| (global-set-key "\C-cow" 'ido-jump-to-window) | |
| (defun windmove-opposite () (interactive) | |
| (if (windmove-find-other-window 'up) (windmove-up) (windmove-down)) | |
| (if (windmove-find-other-window 'right) (windmove-right)(windmove-left))) | |
| (global-set-key "\C-coo" 'windmove-opposite) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| blehblehblehpnf | |
| scala> classOf[Enumeration#Value].getDeclaredFields.find(_.toString.contains("outerEnum")) | |
| res137: Option[java.lang.reflect.Field] = Some(private final scala.Enumeration scala.Enumeration$Value.scala$Enumeration$$outerEnum) | |
| scala> classOf[Enumeration#Value].getDeclaredFields.find(_.toString.contains("outerEnum")).get | |
| res138: java.lang.reflect.Field = private final scala.Enumeration scala.Enumeration$Value.scala$Enumeration$$outerEnum | |
| scala> val f = classOf[Enumeration#Value].getDeclaredFields.find(_.toString.contains("outerEnum")).get | |
| f: java.lang.reflect.Field = private final scala.Enumeration scala.Enumeration$Value.scala$Enumeration$$outerEnum |
NewerOlder