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 <time.h> | |
enum { | |
MAX = 10, | |
}; | |
typedef struct Nameval Nameval; | |
struct Nameval { | |
char *name; |
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 | |
TARGET_DIR=`hostname -s` | |
cd /Volumes/Time\ Machine\ バックアップ | |
ls -le | |
sudo mv Backups.backupdb Backups.backupdb~ | |
cd Backups.backupdb\~/ | |
sudo chmod -N ${TARGET_DIR} | |
ls -le | |
sudo chmod a+r ${TARGET_DIR} |
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
#compdef jsx | |
_arguments -C \ | |
'(- 1 *)--help[displays this help and exits]' \ | |
'(- 1 *)--version[displays displays the version and exits]' \ | |
'(--add-search-path)--add-search-path[add a path to library search paths]:Search Path:' \ | |
'(--executable)--executable[compiles as an CLI executable, calling _Main.main(\:string\[\])\:void]' \ | |
'(--run)--run[runs _Main.main(\:string\[\])\:void after compiling]' \ | |
'(--test)--test[runs _Test#test*()\:void after compiling]' \ | |
'(--output)--output[output file (default\:stdout)]:output file:_files' \ | |
'(--mode)--mode[compilation mode (default\:compile)]:compilation mode:(compile parse)' \ |
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
_jsx() | |
{ | |
local cur prev | |
COMPREPLY=() | |
cur=${COMP_WORDS[COMP_CWORD]} | |
prev=${COMP_WORDS[COMP_CWORD-1]} | |
JSX_OPTIONS='\ | |
--add-search-path\ | |
--executable\ | |
--run\ |
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/perl | |
# Copyright (C) 2011 DeNA Co.,Ltd. | |
# | |
# 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 | |
# the Free Software Foundation; either version 2 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, |
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
--- src/wordbuf.c.orig 2012-07-31 15:24:23.000000000 +0900 | |
+++ src/wordbuf.c 2012-07-31 15:24:38.000000000 +0900 | |
@@ -9,6 +9,7 @@ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
+#include <limits.h> | |
#include "wordbuf.h" | |
#define WORDLEN_DEF 64 |
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
#compdef knife | |
_knife_all_subcommand_with_desc () { | |
_subcommands=(${(@f)"$(knife --help | perl -e 'while(<>){/\A\*\*\s(.+)(?:\sCOMMANDS)?\s\*\*\s*\z/ or next; (my $desc = lc($1))=~s/\s+commands//;($line = <>)=~/knife\s($desc)/; print qq{$1\n$desc\n};}')"}) | |
_1st_arguments=(${(k)_subcommands}) | |
} | |
_knife_subsubcommand() { | |
_2nd_arguments=(${(@f)"$(knife $1 --help | perl -nle "/^knife\\s$1\\s(.*)/; print \$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
#compdef perlbrew | |
typeset -A opt_args | |
local context state line | |
_arguments -C \ | |
'(- 1 *)'{-h,--help}'[prints help]' \ | |
'(-f --force)'{-f,--force}'[Force installation of a perl]' \ | |
'(-q --quiet)'{-q,--quiet}'[Log output to a log file rather than STDOUT. This is the default.]' \ | |
'(-v --verbose)'{-v,--verbose}'[Log output to STDOUT rather than a logfile]' \ |
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
dy.appendChild((function(){ | |
var s = document.createElement("script"); | |
s.type = "text/javascript"; | |
s.src = "http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"; | |
s.onload = function() { | |
window.jQuery.noConflict(); | |
}; | |
return s; | |
})()); | |
} |
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
#compdef plenv | |
# Installation | |
# | |
# * rename '_plenv.zsh' to '_plenv' | |
# * put on $HOME/.zsh/functions/ | |
typeset -A opt_args | |
local context state line |
OlderNewer