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
const MY_DOMAIN = "agodrich.com" | |
const START_PAGE = "https://www.notion.so/gatsby-starter-notion-2c5e3d685aa341088d4cd8daca52fcc2" | |
const DISQUS_SHORTNAME = "agodrich" | |
addEventListener('fetch', event => { | |
event.respondWith(fetchAndApply(event.request)) | |
}) | |
const corsHeaders = { | |
"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
# Only compatible with Server 2019 | |
# Intended to be run as a recurring scheduled task | |
# Parses 240 minutes of logs then based on a tolerance for failed login attempts, creates TCP 3389 (RDP) and ICMP block rules. | |
# This will remove the old rules each time it is run which has the effect of creating a temporary block if this is run as a scheduled task. | |
#Quantity of failed login attempts required to trigger blocking | |
$tolerance = 15 | |
$logName = "Security" |
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 otgorm_test | |
import ( | |
"context" | |
"testing" | |
"github.com/jinzhu/gorm" | |
_ "github.com/jinzhu/gorm/dialects/sqlite" | |
opentracing "github.com/opentracing/opentracing-go" | |
"github.com/opentracing/opentracing-go/mocktracer" |
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
# You need install jenkins go plugin first -> https://wiki.jenkins.io/display/JENKINS/Go+Plugin | |
#!/usr/bin/bash | |
export GOPATH=$WORKSPACE | |
mkdir -p $GOPATH/src | |
project_name=$(echo $GIT_URL | awk -F/ '{print $NF}' | sed 's/.git//g') | |
echo ${project_name} | |
ln -f -s $WORKSPACE $GOPATH/src/$project_name | |
go get $project_name |
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" | |
"os" | |
"runtime" | |
) | |
func userHomeDir() string { | |
if runtime.GOOS == "windows" { |
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 logging | |
import ( | |
"github.com/rs/zerolog" | |
"github.com/rs/zerolog/log" | |
"gopkg.in/natefinch/lumberjack.v2" | |
"os" | |
"path" | |
"io" | |
) |
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
root = true | |
[*] | |
end_of_line = lf | |
insert_final_newline = true | |
[*.php] | |
charset = utf-8 | |
indent_style = space | |
indent_size = 4 |
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 ( | |
"database/sql" | |
"testing" | |
"time" | |
_ "github.com/lib/pq" | |
) |
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
// Node v6.9.0 | |
// | |
// TEST FILE (cut down for simplicity) | |
// To ensure Golang encrypted string can be decrypted in NodeJS. | |
// | |
let crypto; | |
try { | |
crypto = require('crypto'); |
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
127.0.0.1 api.ad.xiaomi.com | |
127.0.0.1 sdkconfig.ad.xiaomi.com | |
127.0.0.1 ad.mi.com | |
127.0.0.1 ad.xiaomi.com | |
127.0.0.1 ad1.xiaomi.com | |
127.0.0.1 adv.sec.miui.com | |
127.0.0.1 test.ad.xiaomi.com | |
127.0.0.1 new.api.ad.xiaomi.com |
NewerOlder