- Container:
alpine:edge
onlinux/arm64
- Command:
wrk -t12 -c400 -d30s http://127.0.0.1:<PORT>
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 = docker/dockerfile:1 | |
# Make sure RUBY_VERSION matches the Ruby version in .ruby-version and Gemfile | |
ARG RUBY_VERSION=3.3.0 | |
FROM registry.docker.com/library/ruby:$RUBY_VERSION-alpine as base | |
# Rails app lives here | |
WORKDIR /rails | |
# Set production environment |
-
Enter UEFI (keep volume [+] and ⏻ button at power up), disable Secure Boot and make USB first in boot order.
-
Install Kali with Gnome environment.
-
Install the Linux Surface kernel.
wget -qO - https://raw.githubusercontent.com/linux-surface/linux-surface/master/pkg/keys/surface.asc | gpg --dearmor | sudo dd of=/etc/apt/trusted.gpg.d/linux-surface.gpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
// Gatsby + Ant Design + Less | |
// gatsby-config.js plugins | |
{ | |
resolve: `gatsby-plugin-less`, | |
options: { | |
javascriptEnabled: true, | |
modifyVars: { | |
hack: `true; @import "${__dirname}/src/components/antd.less";`, |
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/sh | |
# Install | |
pkg install open-vm-tools xf86-input-vmmouse xf86-video-vmware xorg openbox obmenu | |
# Run services on start (see /etc/rc.conf) | |
sysrc dbus_enable="YES" | |
sysrc moused_enable="YES" | |
sysrc vmware_guest_vmblock_enable="YES" | |
sysrc vmware_guest_vmhgfs_enable="YES" |
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
RewriteEngine on | |
RewriteCond %{REQUEST_URI} !^/up.php | |
# TODO: Handle random port. | |
# TODO: Use ProxyPass or ProxyPassMatch instead of mod_proxy's RewriteRule for better performance. | |
RewriteRule ^(.*) http://127.0.0.1:8080/$1 [P] |
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 ( | |
"bufio" | |
"encoding/json" | |
"errors" | |
"fmt" | |
"log" | |
"net/http" | |
"net/url" |
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 ( | |
testString = "xkjXS98XarHFzP1DQu03fJTLQQ7raCvoSKwlAjtTUgxZIbRt9OoAQyByESBXFYnxoHetPiZdfLHUDSh6ix1MQ2hUWKli2c79RPCjJd8weljUMh7XjIToFjU7W67gYDwMAtihxI5twI33hL6Bran4wclJcOGZVmlkASofpsPSWmsR3PS8p01rrVxcCvuSXuyIQa0JMrLI" | |
testStringsSlice = make([]struct{}, 1000) | |
) | |
// 69.4 ns/op | |
func BenchmarkForString(b *testing.B) { | |
for i := 0; i < b.N; i++ { | |
for j := 0; j < len(testString); j++ { | |
if testString[j] == '0' { |
NewerOlder