This file contains 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
// allows using all Jquery AJAX methods in Greasemonkey | |
// inspired from http://ryangreenberg.com/archives/2010/03/greasemonkey_jquery.php | |
// works with JQuery 1.5 | |
// (c) 2011 Martin Monperrus | |
// (c) 2010 Ryan Greenberg | |
// | |
// Usage: | |
// $.ajax({ | |
// url: '/p/', | |
// xhr: function(){return new GM_XHR();}, |
This file contains 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
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
/* | |
A basic lens library for the purpose of demonstration. | |
Implements a lens as the costate comonad coalgebra. | |
This library is not complete. | |
A more complete lens library would take from |
This file contains 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/bash | |
# i3 thread: https://faq.i3wm.org/question/150/how-to-launch-a-terminal-from-here/?answer=152#post-id-152 | |
# Inspired by https://gist.github.com/viking/5851049 but with support for tmux | |
CWD='' | |
# Get window ID | |
ID=$(xdpyinfo | grep focus | cut -f4 -d " ") | |
# Get PID of process whose window this is |
This file contains 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
{-# OPTIONS -Wall #-} | |
module Creepsay where | |
-- ^ This file has some random scribblings for Screeps Diplomacy | |
-- protocol discussion. Most of the things in here are not directly | |
-- of use, but might help for assembling reference examples, once we | |
-- figure out how the various layers should work. | |
-- | |
-- The 62k suffix entries are "base62k" encoding, i.e. using all of | |
-- the UCS2 space except for the 0xd800-0xdfff region historically |
This file contains 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
;; -*- mode: dotspacemacs -*- | |
;; This file is loaded by Spacemacs at startup. | |
;; It must be stored in your home directory. | |
(defun dotspacemacs/layers () | |
"Configuration Layers declaration." | |
(setq-default | |
;; List of additional paths where to look for configuration layers. | |
;; Paths must have a trailing slash (ie. `~/.mycontribs/') | |
dotspacemacs-configuration-layer-path '() |
This file contains 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 TupleSections #-} | |
module Delaunay where | |
import qualified Data.Function as F | |
import qualified Data.List as L | |
import Data.Map.Strict (Map) | |
import qualified Data.Map.Strict as Map | |
import Data.Set (Set) | |
import qualified Data.Set as Set |
This file contains 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
(printf \\x30\\x2e\\x02\\x01\\x00\\x30\\x05\\x06\\x03\\x2b\\x65\\x70\\x04\\x22\\x04\\x20;egrep -v "^-" | tr -d '\n' | base64 -d | dd bs=161 skip=1 2>/dev/null | dd bs=32 count=1 2>/dev/null) | openssl pkey -inform der -outform pem |
This file contains 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
#!/usr/bin/env bash | |
# NixOS-only cargo wrapper that: | |
# - always uses mold for linking. | |
# - sets `-C target-cpu=haswell` to avoid generating code for pre-2013 CPUs. | |
# - sets `-C link-arg=-Wl,--compress-debug-sections=zlib-gabi` to compress debug sections. | |
# - sets LIBCLANG_PATH for projects that need clang. | |
# - sets `-Z share-generics` to reduce output binary sizes by ~2MB. | |
# - turns on cargo's sparse-registry feature. | |
# - increases niceness slightly with `nice -n 2` . |