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
| var csv = require('csv'), | |
| fs = require('fs'); | |
| csv().from.stream(fs.createReadStream("./sample.csv")).on('record', function (data) { | |
| var i; | |
| for (i = 0; i < data.length; ++i) { | |
| console.log(data[i]); | |
| } | |
| }); |
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
| #!perl | |
| use strict; | |
| use warnings; | |
| use 5.010; | |
| package LifeGame::Cell; | |
| sub new { | |
| my ($class, $state) = @_; |
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
| (defun cde-not-elscreen () | |
| (let* ((bufsinfo (cadr (cadr (current-frame-configuration)))) | |
| (bufname-list (assoc-default 'buffer-list bufsinfo))) | |
| (loop for buf in bufname-list | |
| for file = (buffer-file-name buf) | |
| when file | |
| return (file-name-directory it)))) |
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
| ;; P1 Find the last box of a list. | |
| (defun my-last (lst) | |
| (if (null (cdr lst)) | |
| lst | |
| (my-last (cdr lst)))) | |
| ;; P2 Find the last but one box of a list. | |
| (defun my-but-last (lst) | |
| (if (null (cddr lst)) | |
| lst |
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
| (defun cperl-get-package-name () | |
| (save-excursion | |
| (goto-char (point-min)) | |
| (if (re-search-forward "^\\s-*package\\s-+\\([^ ;]+\\)" nil t) | |
| (match-string-no-properties 1) | |
| ""))) | |
| (defun cperl-check-package-name () | |
| (interactive) | |
| (let* ((path (file-name-sans-extension (buffer-file-name))) |
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
| (deftheme molokai | |
| "Molokai color theme") | |
| (custom-theme-set-faces | |
| 'molokai | |
| ;; background, font color(foreground), cursor | |
| '(cursor ((t (:foreground "#F8F8F0")))) | |
| '(default ((t (:background "#1B1D1E" :foreground "#F8F8F2")))) |
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
| (fringe-helper-define 'test-bitmap nil | |
| "...XXX..." | |
| "...XXX..." | |
| "...XXX..." | |
| "XXXXXXXXX" | |
| "XXXXXXXXX" | |
| "...XXX..." | |
| "...XXX..." | |
| "...XXX...") |
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
| (setq ov (make-overlay 0 0)) | |
| (overlay-put ov 'before-string (propertize " " 'display | |
| '((margin left-margin) "++"))) | |
| (overlay-put ov 'linum-str "++") | |
| (set-window-margins (get-buffer-window) 2 (cdr (window-margins (get-buffer-window)))) | |
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
| ;;; instant-markdown.el --- | |
| ;; Copyright (C) 2012 by Syohei YOSHIDA | |
| ;; Author: Syohei YOSHIDA <[email protected]> | |
| ;; URL: | |
| ;; Version: 0.01 | |
| ;; This program is free software; you can redistribute it and/or modify | |
| ;; it under the terms of the GNU General Public License as published by |
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
| ;; alc | |
| (defun alc (word) | |
| (interactive | |
| (list (read-string "Search Word: " ))) | |
| (browse-url | |
| (format "http://eow.alc.co.jp/%s/UTF-8/?ref=sa" word))) | |
| ;; google search | |
| (defun google (words-str) | |
| (interactive |