brew install openssl
git clone git://anongit.mindrot.org/openssh.git
cd openssh
# ./configure script does not exist, so we have to build it
autoreconf
mkdir dist
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 | |
CURRENT="$PWD" | |
while [ `basename $CURRENT` != "src" -a "$CURRENT" != "/" -a -n "$CURRENT" ]; do | |
CURRENT=`dirname "$CURRENT"` | |
#echo "'$CURRENT'" | |
done | |
if [ `basename "$CURRENT"` == "src" ]; then | |
export GOPATH=`dirname "$CURRENT"` |
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 ( | |
"crypto/tls" | |
"fmt" | |
"time" | |
"crypto/x509" | |
) | |
const rootCert = `-----BEGIN CERTIFICATE----- | |
MIIEMzCCAxugAwIBAgIBATANBgkqhkiG9w0BAQUFADA5MQswCQYDVQQGEwJSVTEM |
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 ( | |
"crypto/x509" | |
"crypto/tls" | |
"fmt" | |
) | |
const rootCert = `-----BEGIN CERTIFICATE----- | |
MIIEMzCCAxugAwIBAgIBATANBgkqhkiG9w0BAQUFADA5MQswCQYDVQQGEwJSVTEM | |
MAoGA1UECBMDdG1wMQwwCgYDVQQKEwN0bXAxDjAMBgNVBAMTBXRtcENBMCAXDTE1 | |
MDgwNzExMzMwMFoYDzIzODAwODA3MTEzMzAwWjA5MQswCQYDVQQGEwJSVTEMMAoG |
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
<?php | |
if ($_SERVER['REQUEST_METHOD'] === 'POST') { | |
$REKBY_DUMP_ARR = array(); | |
$REKBY_DUMP_ARR['URI'] = $_SERVER['REQUEST_URI']; | |
$REKBY_DUMP_ARR['REQUEST'] = $_REQUEST; | |
$REKBY_DUMP_ARR['GET'] = $_GET; | |
$REKBY_DUMP_ARR['POST'] = $_POST; | |
$REKBY_DUMP_ARR['COOKIE'] = $_COOKIE; | |
$REKBY_DUMP_ARR['REMOTE_ADDR'] = $_SERVER['REMOTE_ADDR']; | |
file_put_contents("../php-log/".date('Y-m-d--H-i-s--').rand(100000,999999), print_r($REKBY_DUMP_ARR, 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
#!/bin/bash | |
# Workaround for https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1784152 | |
# Copy the script to /lib/systemd/system-sleep/reload-dell-touchpad.sh | |
SUSPEND_MODULES="i2c_hid" | |
case $1 in | |
pre) | |
for mod in $SUSPEND_MODULES; do | |
rmmod $mod |
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 | |
// DO NOT EDIT! | |
// The code below was generated with http://github.com/gojuno/minimock (dev) | |
//go:generate minimock -i tmp.Summer -o ./summer_mock_test.go | |
import ( | |
"sync/atomic" | |
"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
package asd | |
// DO NOT EDIT! | |
// The code below was generated with http://github.com/gojuno/minimock (dev) | |
//go:generate minimock -i tmp.Int -o ./int_mock_test.go | |
import ( | |
"sync/atomic" | |
"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
package ctxcancel | |
import "context" | |
// CtxCancel run f in background and return result | |
// onCancel called if ctx cancelled before f return result | |
// it called after f finish | |
// return f result of ctx.Err() (if ctx cancelled) | |
func CtxCancel(ctx context.Context, f func() error, onCancel func()) error { | |
fResult := make(chan error, 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
package main | |
import ( | |
"fmt" | |
"net/http" | |
"net/http/httptest" | |
"strings" | |
) | |
const encodingHeader = "Accept-Encoding" |
OlderNewer