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 main | |
: | |
import文省略 | |
: | |
var permissions := make(map[string][]string) // なんか読み込む | |
func hasPermission(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo) bool { | |
// 例えばCommonName単位でアクセス可能なパスを管理しておいて前方一致で比較する実装 |
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 main | |
import ( | |
"context" | |
"crypto/tls" | |
"crypto/x509" | |
"fmt" | |
"io/ioutil" | |
"time" |
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
(function () { | |
angular.module('MyModule', []) | |
.directive( | |
'autoResizeDirective', | |
[ | |
'$parse', | |
function ($parse) { | |
return { | |
restrict: 'AC', | |
scope: true, |
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
import java.util.*; | |
import java.lang.*; | |
import java.io.*; | |
public class Sample | |
{ | |
public static void main (String[] args) throws java.lang.Exception | |
{ | |
exec("+/10times", new Runnable() { | |
@Override |
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 entity; | |
import com.fasterxml.jackson.annotation.JsonValue; | |
import com.fasterxml.jackson.core.JsonProcessingException; | |
import com.fasterxml.jackson.databind.ObjectMapper; | |
import com.fasterxml.jackson.databind.PropertyNamingStrategy; | |
import com.fasterxml.jackson.databind.SerializationFeature; | |
import com.google.common.collect.ImmutableMap; | |
import lombok.AllArgsConstructor; | |
import lombok.Getter; |
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 _ = require('lodash'), | |
fs = require('fs'), | |
path = require('path'), | |
async = require('async'), | |
request = require('request'), | |
BaseError = require('src/error/base'), | |
SystemError = require('src/error/system'), | |
InvalidParamError = require('src/error/invalidparam') | |
JsonReader = require('src/util/json_reader'); |
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 | |
echo "Current iptables => " | |
iptables -L | |
echo "Flush iptables => " | |
iptables -F | |
echo "Save iptables => " | |
service iptables save |
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
public HttpClientFactoryV43 { | |
private BasicHttpClientConnectionManager connectionManager; | |
public HttpClientFactoryV43() { | |
try { | |
SSLContext sslContext = new SSLContextBuilder() | |
.loadTrustMaterial( | |
null, | |
new TrustSelfSignedStrategy()) |
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
public class HttpClientFactory { | |
public HttpClient insecureClient() { | |
try { | |
SSLSocketFactory sslSocketFactory = | |
new SSLSocketFactory( | |
new TrustSelfSignedStrategy(), | |
new AllowAllHostnameVerifier()); | |
SchemeRegistry schemeRegistry = new SchemeRegistry(); | |
schemeRegistry.register(new Scheme("https", 8443, sslSocketFactory)); | |
schemeRegistry.register(new Scheme("https", 443, sslSocketFactory)); |
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
:syntax on | |
:set tabstop=4 | |
:set number | |
:set title | |
:colorscheme desert |
NewerOlder