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 middleware | |
import ( | |
"net/http" | |
) | |
// Cors hello | |
func Cors(next http.Handler) http.HandlerFunc { | |
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { | |
w.Header().Set("Access-Control-Allow-Origin", "*") |
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
var getIndex = function(arr, verify) { | |
for (var i = 0; i < arr.length; i++) { | |
if (verify(arr[i])) { | |
return i; | |
} | |
} | |
return -1; | |
}; | |
//var index = getIndex(notesCache.items, function (element) { |
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
set nocompatible " be iMproved, required | |
so ~/.vim/plugins.vim | |
syntax enable | |
set backspace=indent,eol,start | |
let mapleader = ',' | |
set number |
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/ruby | |
# url_content_iterate.rb | |
require 'open-uri' | |
#https://gist.github.com/myabc/7905820e99914c2acdf8#file-list-of-plugins | |
REMOTE_URL = 'https://gist.githubusercontent.com/myabc/7905820e99914c2acdf8/raw/4b0f8da8ff8462c824f155b1b3f04ed36ff8e661/List%20of%20plugins' | |
LOCAL_FILE = './plugin_list.txt' | |
LOCAL_PLUGIN_GENERATOR = 'plugin_generator.plugin' |