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/sh | |
# Converts bib file to markdown bibliography text. | |
# Treats markdown headings in bib file as chapters. | |
# You can put any markdown there and | |
# actually use references to entries in the chapter. | |
# (You can't, if you want to use it with biblatex). | |
if [ -z "$1" ]; then | |
echo "Usage: $0 bib-file [csl-file]" | |
exit 1; |
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 ruby | |
# As source you need HTML file from http://apps.who.int/classifications/icfbrowser/Default.aspx | |
# with unfolded tree. | |
# It uses Ajax to fetch nested entries, so unfold each manually or you can use JS console to autoclick. | |
require 'optparse' | |
require 'nokogiri' | |
require 'json' | |
require 'csv' | |
class ICFEntry < Struct.new(:id, :code, :title, :children) |
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
import org.omegat.core.Core | |
import java.awt.Toolkit | |
import java.awt.datatransfer.StringSelection | |
import java.awt.datatransfer.Transferable | |
def clipboard = Toolkit.getDefaultToolkit().getSystemClipboard() | |
def text = Core.getEditor().getCurrentEntry().srcText | |
clipboard.setContents(new StringSelection(text), null) |
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
# I recommend to use [GGaly::ggsurv](http://ggobi.github.io/ggally). | |
# Can't remember why, but it didn't work for my purpose, so I wrote this. | |
# | |
# - ggsurv.data - produces data.frame to use with ggplot | |
# * survfit | |
# * optional subset rule | |
# | |
# - ggsurv.plot - plots survfit or data.frame. | |
# * survfit / data.frame | |
# * ms - if data.frame is passed, set to true/false if model is multistate |
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
;;; rails-console-remote.el --- remote rails console over ssh | |
;; Copyright (C) 2016 Kirill Voronin <[email protected]> | |
;; Author: Kirill Voronin <[email protected]> | |
;; Keywords: rails | |
;; Version: 0.0.1 | |
(defun rails-console-remote (&optional host &optional path &optional env &optional user-cmd) | |
"Call `run-ruby'." |
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
FROM wernight/dante | |
RUN sed -i '177s/#socksmethod/socksmethod/' /etc/sockd.conf | |
EXPOSE 1080 | |
ENTRYPOINT ["dumb-init"] | |
CMD ["sockd"] |
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
[diff "xlsx"] | |
command = xlsx2daff diff | |
[diff "csv"] | |
command = daff diff --git |
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/sh | |
# Author: Kirill Voronin <[email protected]> | |
# Ediff with exit code | |
# Opens ediff in existing Emacs window using emacsclient | |
# and returns exit code when *ediff-diff* buffer closed | |
get_buffer() { | |
emacsclient --eval "(get-buffer \"$1\")" | |
} |
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
/* Firefox Lockwise password copy buttons. | |
1. Copy code below to the console. | |
2. Select each login in the left menu, click Copy password button. | |
3. Click Copy all passwords button. | |
4. ??? | |
5. PROFIT | |
*/ | |
const TIMEOUT = 300; | |
var passwords = []; |
OlderNewer