Skip to content

Instantly share code, notes, and snippets.

😾
Meowing

NeverBehave NeverBehave

😾
Meowing
Block or report user

Report or block NeverBehave

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View uninstall.sh
#!/bin/sh
set -x
systemctl stop k3s
systemctl disable k3s
systemctl daemon-reload
rm -f /etc/systemd/system/k3s.service
rm -f /usr/local/bin/k3s
if [ -L /usr/local/bin/kubectl ]; then
rm -f /usr/local/bin/kubectl
fi
@NeverBehave
NeverBehave / DynamicIP.sh
Last active Jan 10, 2019
Script for Dynamic IP with Rancher Agent (v1.6)
View DynamicIP.sh
#!/bin/bash
# https://rancher.com/docs/rancher/v1.6/en/faqs/agents/#how-does-the-host-determine-ip-address-and-how-can-i-change-it-what-do-i-do-if-the-ip-of-my-host-has-changed-due-to-reboot
LOCATION="/tmp/ip.txt"
RANCHER_URL=""
function getIPAndSave() {
ip=$(curl -s https://api-ipv4.ip.sb/ip)
rc=$?
if [ "$rc" != "0" ]; then
View Procedures
### Qs
- Company in same NAICS but different SIC
### PPT
- Print out a noted version
- black and white may lose features
- One present and one to defense
View simple_http_server.sh
#!/bin/bash
while true
do
{ echo -ne "HTTP/1.0 200 OK\r\nContent-Length: $(wc -c <index.html)\r\n\r\n"; cat index.html; } | nc -l -p 80
done
View iptables_redirect.sh
#!/bin/bash
#===============================================================================
#
# FILE: iptable_redirect_port.sh
#
# USAGE: ./iptable_redirect_port.sh PROTOCOL SERVER_PORT DHOST DPORT [-d]
#
# DESCRIPTION: Redirect traffic to another server.
#
# OPTIONS: —
@NeverBehave
NeverBehave / NexusPHPThanks.sh
Last active Jun 14, 2018
NexusPHP 批量刷感谢
View NexusPHPThanks.sh
HTTP='https://'
SITE='hdhome.org'
COOKIE='Your Cookie Here'
MAX=30000
for i in {${MAX}..1}
do
curl "${HTTP}${SITE}/thanks.php" -H "origin: ${SITE}" -H 'accept-encoding: gzip, deflate, br' -H 'accept-language: en,zh-CN;q=0.9,zh;q=0.8' -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36' -H 'content-type: application/x-www-form-urlencoded' -H 'accept: */*' -H "referer: {SITE}/details.php?id=${i}&hit=1" -H 'authority: ${SITE}' -H "cookie: ${COOKIE}" -H 'dnt: 1' --data "id=${i}" --compressed --connection-timeout 3
echo -------------${i} passed---------------
done
@NeverBehave
NeverBehave / README.md
Created Oct 11, 2017 — forked from bekce/README.md
ldap server with mysql backend
View README.md

I wanted to build an LDAP server that queries a MySQL server to fetch users and check their passwords. It is mainly used for old software that does not work with custom OAuth2 providers. Redmine is an example of this.

Instructions:

  1. Create the database and table with insert.sql
View new_stage1.prototxt
name: "DFA_full_stage1_TRAIN"
layer {
name: "data"
type: "HDF5Data"
top: "data"
top: "label"
include {
phase: TRAIN
}
View Vgg16_train_val.prototxt
name: "VGG_ILSVRC_16_layers"
layer {
name: "data"
type: "Data"
include {
phase: TRAIN
}
transform_param {
crop_size: 224
mean_value: 104
View Final_stage1_set.prototxt
name: "DFA_full_stage1_TRAIN"
layer {
name: "data"
type: "Data"
top: "data"
include {
phase: TRAIN
}
transform_param {
You can’t perform that action at this time.