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
;;; copy-as-html-for-paste.el | |
;; | |
;; I wanted some code highlighting to paste into Google Docs, | |
;; and people suggest `htmlize' the buffer, open the HTML file | |
;; in browser then copy-paste the content into the docs. This | |
;; works, but it is not pragmatic. | |
;; | |
;; Then I have free time after the lunch, I set out to really | |
;; understand the process. Emacs can do this, for sure, since Chrome | |
;; is already able to set rich clipboard, just need to figure out |
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
(ns logic-puzzle.core | |
(:refer-clojure :exclude [==]) | |
(:require [clojure.core.logic :refer :all])) | |
(defn squaro [q] | |
(let [colors [:red :green :blue :yellow]] | |
(fresh [a1 a2 a3 a4 | |
b1 b2 b3 b4] | |
(all | |
(permuteo colors [a1 a2 a3 a4]) |
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
(use-package vc | |
:defer t | |
:config | |
(progn | |
(setq vc-follow-symlinks t) | |
(defun td/vc-git-command (verb fn) | |
(let* ((args (vc-deduce-fileset nil t)) | |
(backend (car args)) | |
(files (nth 1 args))) |
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
[profiler-profile "24.3" cpu #s(hash-table size 730 test equal rehash-size 1.5 rehash-threshold 0.8 data ([nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil] 359 [tramp-dissect-file-name tramp-file-name-method string= tramp-smb-file-name-p tramp-find-foreign-file-name-handler tramp-file-name-handler file-name-directory ange-ftp-file-attributes apply byte-code ange-ftp-hook-function apply tramp-ftp-file-name-handler apply byte-code byte-code] 1 [byte-code ange-ftp-wait-not-busy ange-ftp-raw-send-cmd ange-ftp-send-cmd ange-ftp-file-modtime ange-ftp-file-attributes apply byte-code ange-ftp-hook-function apply tramp-ftp-file-name-handler apply byte-code byte-code tramp-file-name-handler file-attributes] 99 [byte-code ange-ftp-wait-not-busy ange-ftp-raw-send-cmd "#<compiled 0x411a05d1>" apply ange-ftp-call-cont ange-ftp-process-filter accept-process-output byte-code ange-ftp-wait-not-busy ange-ftp-raw-send-cmd ange-ftp-send-cmd ange-ftp-file-modtime ange-ftp-file-attributes apply byte-code] 112 [byte |
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 --git a/plugin/snipMate.vim b/plugin/snipMate.vim | |
index ef03b12..b1738c6 100644 | |
--- a/plugin/snipMate.vim | |
+++ b/plugin/snipMate.vim | |
@@ -159,8 +159,10 @@ fun! TriggerSnippet() | |
if exists('SuperTabKey') | |
call feedkeys(SuperTabKey) | return '' | |
endif | |
- call feedkeys("\<esc>a", 'n') " Close completion menu | |
- call feedkeys("\<tab>") | return '' |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#define LEN 80 | |
#define INIT_SIZE 30 | |
typedef struct Entry { | |
void* key; | |
void* value; |
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 --git a/autoload/neocomplcache/sources/snippets_complete.vim b/autoload/neocomplcache/sources/snippets_complete.vim | |
index f229823..87e9cc7 100644 | |
--- a/autoload/neocomplcache/sources/snippets_complete.vim | |
+++ b/autoload/neocomplcache/sources/snippets_complete.vim | |
@@ -528,7 +528,11 @@ function! s:expand_newline()"{{{ | |
while match >= 0 | |
let end = getline('.')[matchend(getline('.'), '<\\n>') :] | |
" Substitute CR. | |
- silent! s/<\\n>// | |
+ if &gdefault |
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
" A ref source for ch. https://github.com/visionmedia/ch | |
" Version: 0.0.1 | |
" Heavily based on man source by: | |
" Author : thinca <thinca+vim@gmail.com> | |
let s:save_cpo = &cpo | |
set cpo&vim | |
scriptencoding utf-8 |
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
package com.tungd; | |
import java.awt.BasicStroke; | |
import java.awt.Color; | |
import java.awt.Graphics; | |
import java.awt.Graphics2D; | |
import java.awt.RenderingHints; | |
import java.awt.geom.Line2D; | |
import java.awt.geom.QuadCurve2D; | |
import javax.swing.JFrame; |
OlderNewer