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
" check for ctags folder, if not exist extract our ctags binary | |
if !isdirectory(expand("$HOME/.vim/binary/ctags/")) | |
let ctags_bottle_dir = expand("$HOME/.vim/binary/") | |
let ctags_bottle_file = expand("$HOME/.vim/binary/ctags-5.8.mountain_lion.bottle.tar.gz") | |
execute "cd ".ctags_bottle_dir | |
execute "!tar xfv ".ctags_bottle_file | |
endif |
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
"this produces an output like: | |
" /path/file1.txt | |
" /path/file2.txt | |
" /path/file3.txt | |
function! GoFiles() | |
let out=system("go list -f $'{{range $f := .GoFiles}}{{$.Dir}}/{{$f}}\n{{end}}'") | |
echo out | |
endfunction |
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
" Copyright 2013 The Go Authors. All rights reserved. | |
" Use of this source code is governed by a BSD-style | |
" license that can be found in the LICENSE file. | |
" | |
" compiler/go.vim: Vim compiler file for Go. | |
if exists("current_compiler") | |
finish | |
endif | |
let current_compiler = "go" |
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
let data = ['func Split(s string, sep string) []string', 'func SplitAfter(s string, sep string) []s | |
tring', 'func SplitAfterN(s string, sep string, n int) []string', 'func SplitN(s string, | |
sep string, n int) []string'] | |
let wordMatch = "'\<" . expand("<cword>") . "\>'" | |
let filtered = filter(infos, 'v:val !~ ' . wordMatch) | |
echo filtered |
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 sshutil | |
import ( | |
"bytes" | |
"crypto/rand" | |
"crypto/rsa" | |
"crypto/x509" | |
"encoding/pem" | |
"errors" | |
"fmt" |
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
fun main(numbers: int list) = | |
let | |
fun sum(numbers: int list) = | |
if null numbers | |
then 0 | |
else hd numbers + sum (tl numbers) | |
in | |
sum(numbers) | |
end |
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
{ | |
"variables": { | |
"aws_access_key": "{{env `AWS_ACCESS_KEY`}}", | |
"aws_secret_key": "{{env `AWS_SECRET_KEY`}}", | |
}, | |
"builders": [ | |
{ | |
"access_key": "{{user `aws_access_key`}}", | |
"secret_key": "{{user `aws_secret_key`}}", | |
"ami_name": "latest-{{timestamp}}", |
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
variable "environment_name" { | |
default = "fatih-testing" | |
} | |
provider "aws" { | |
region = "ap-northeast-1" | |
} | |
resource "aws_vpc" "default" { | |
cidr_block = "10.0.0.0/16" |
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> | |
int main(void) | |
{ | |
int my_array[] = {13, 4, 9, -5, 45}; | |
printf("This is my_array[3]: %d\n", my_array[3]); | |
printf("This is 3[my_array]: %d\n", 3[my_array]); | |
return 0; |
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> | |
int main(void) | |
{ | |
int my_array[] = {13, 4, 9, -5, 45}; | |
int *ptr = NULL; | |
puts("Now execute ptr = my_array (or ptr = &my_array[0]\n"); | |
// Assing the the addres of my_array(which is of type pointer) to a new pointer (to ptr) |
OlderNewer