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
| sdcsdcsd |
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
| if !empty(glob(".git")) | |
| function! GitLsFilesModified(A,L,P) | |
| let pattern = a:A | |
| if len(pattern) > 0 | |
| return split(system("git ls-files --untracked --modified \| grep " . pattern), "\n") | |
| else | |
| return split(system("git ls-files --untracked --modified"), "\n") | |
| endif | |
| endfunction | |
| command! -complete=customlist,GitLsFilesModified -nargs=1 G :edit <args> |
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
| if !empty(glob(".git")) | |
| function! GitLsFiles(A,L,P) | |
| let pattern = a:A | |
| if len(pattern) > 0 | |
| return split(system("git ls-files \| grep " . pattern), "\n") | |
| else | |
| return split(system("git ls-files"), "\n") | |
| endif | |
| endfunction | |
| command! -complete=customlist,GitLsFiles -nargs=1 Z :edit <args> |
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
| # ip addresses | |
| servers = [ | |
| "1.1.1.1" | |
| ] | |
| user = "ubuntu" | |
| servers.each do |server| | |
| puts server | |
| system "scp -q -p test-for-vulnerability #{user}@#{server}:~" |
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
| if !empty(glob(".git")) | |
| function! GitLsFiles(A,L,P) | |
| let pattern = a:A | |
| if len(pattern) > 0 | |
| return split(system("git ls-files \| grep " . pattern), "\n") | |
| else | |
| return split(system("git ls-files"), "\n") | |
| endif | |
| endfunction | |
| command! -complete=customlist,GitLsFiles -nargs=1 Z :edit <args> |
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
| with("#{ENV['HOME']}/test_history", 'a', 0600). |
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
| FROM ubuntu:latest | |
| RUN apt-get update -y | |
| RUN apt-get install -y wget make git | |
| RUN wget --no-check-certificate -O ruby-install-0.4.3.tar.gz https://github.com/postmodern/ruby-install/archive/v0.4.3.tar.gz | |
| RUN tar -xzvf ruby-install-0.4.3.tar.gz | |
| RUN cd ruby-install-0.4.3 && make install && cd .. && rm -rf ruby-install-0.4.3 | |
| RUN ruby-install -i /usr/local ruby 2.1.2 | |
| RUN gem install --no-rdoc --no-ri bundler |
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
| function! GitLsFiles(A,L,P) | |
| let pattern = a:A | |
| if len(pattern) > 0 | |
| return split(system("git ls-files \| grep " . pattern), "\n") | |
| else | |
| return split(system("git ls-files"), "\n") | |
| endif | |
| endfunction | |
| command -complete=customlist,GitLsFiles -nargs=1 Z :edit <args> |
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
| func RequestCreateProductIndex() error { | |
| mappings := ` | |
| { | |
| "mappings":{ | |
| "product":{ | |
| "properties":{ | |
| "name":{"type":"string","analyzer":"snowball"}, | |
| "price":{"type":"double","index":"not_analyzed"}, | |
| "saleprice":{"type":"double","index":"not_analyzed"}, |
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
| package main | |
| import ( | |
| "fmt" | |
| "net/http" | |
| ) | |
| func main() { | |
| http.HandleFunc("/", CreateHandler) | |
| http.ListenAndServe(":8000", nil) |