Skip to content

Instantly share code, notes, and snippets.

View FrenchBen's full-sized avatar
:octocat:
Loading...

French Ben FrenchBen

:octocat:
Loading...
  • Docker inc.
  • San Francisco, CA
View GitHub Profile
#!/bin/bash -p
#
# Source: https://legalhackers.com/advisories/MySQL-Maria-Percona-RootPrivEsc-CVE-2016-6664-5617-Exploit.html // http://legalhackers.com/exploits/CVE-2016-6664/mysql-chowned.sh
#
# MySQL / MariaDB / PerconaDB - Root Privilege Escalation PoC Exploit
# mysql-chowned.sh (ver. 1.0)
#
# CVE-2016-6664 / OCVE-2016-5617
#
# Discovered and coded by:
@FrenchBen
FrenchBen / bin-alternative.md
Created November 11, 2021 21:06
Quick paste-bin like alternative

Using HasteBin

Manual

$ curl -s -X POST https://www.toptal.com/developers/hastebin/documents -d "Hello World!"
{"key":"aeiou"}
$ curl https://www.toptal.com/developers/hastebin/raw/aeiou
Hello World!
@FrenchBen
FrenchBen / .vimrc
Created November 11, 2021 21:03
AWS ec2 VIM settings
if v:lang =~ "utf8$" || v:lang =~ "UTF-8$"
set fileencodings=ucs-bom,utf-8,latin1
endif
set nocompatible " Use Vim defaults (much better!)
set bs=indent,eol,start " allow backspacing over everything in insert mode
"set ai " always set autoindenting on
"set backup " keep a backup file
set viminfo='20,\"50 " read/write a .viminfo file, don't store more
" than 50 lines of registers
@FrenchBen
FrenchBen / main.go
Created September 27, 2021 22:27
Golang range with a map[string] is non-deterministic
package main
import (
"fmt"
)
func main() {
subcharts := make(map[string][]string)
for i := 1; i < 4; i++ {
cname := fmt.Sprintf("package-%d.0.0.tgz", i)
@FrenchBen
FrenchBen / errorlogs.sh
Created September 25, 2021 00:27
helm make test with golang-ci v1.42.1 and using `revive`
make test
GO111MODULE=on go build -trimpath -tags '' -ldflags '-w -s -X helm.sh/helm/v3/internal/version.metadata=unreleased -X helm.sh/helm/v3/internal/version.gitCommit=9fafb4ad6811afb017cc464b630be2ff8390ac63 -X helm.sh/helm/v3/internal/version.gitTreeState=clean -X helm.sh/helm/v3/pkg/lint/rules.k8sVersionMajor=1 -X helm.sh/helm/v3/pkg/lint/rules.k8sVersionMinor=22 -X helm.sh/helm/v3/pkg/chartutil.k8sVersionMajor=1 -X helm.sh/helm/v3/pkg/chartutil.k8sVersionMinor=22' -o '/go/src/helm/bin'/helm ./cmd/helm
go: downloading github.com/Masterminds/semver/v3 v3.1.1
go: downloading github.com/docker/docker v17.12.0-ce-rc1.0.20200618181300-9dc6525e6118+incompatible
....
GO111MODULE=on golangci-lint run
GO111MODULE=on golangci-lint run
pkg/helmpath/lazypath_unix.go:13: File is not `gofmt`-ed with `-s` (gofmt)
pkg/helmpath/home_unix_test.go:13: File is not `gofmt`-ed with `-s` (gofmt)
@FrenchBen
FrenchBen / adb-firetv-cmd.sh
Created July 15, 2021 01:02
List of commands available for ADB against FireTV smart TV
# Connect to TV
adb connect <TV_IP>
# verify devices
adb devices
# list installed packages
adb shell pm list packages -f -3
# list all packages
adb shell pm list packages -f
@FrenchBen
FrenchBen / setup.sh
Last active November 10, 2020 05:32
Setup Tmux + VIM + Oh-My-Zsh
# Setup was inspired from
# https://medium.com/@yash.kulshrestha/using-zsh-tmux-and-vim-for-web-development-eff7bd60e5d6
# install brew
sh -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
# install iterm2
brew cask install iterm2
# install tmux
@FrenchBen
FrenchBen / flutter.rb
Created March 18, 2020 15:41
Homebrew Flutter install
class Flutter < Formula
desc "Google’s UI toolkit for mobile, web, and desktop from a single codebase"
homepage "https://flutter.dev"
version "1.12.13"
url "https://storage.googleapis.com/flutter_infra/releases/stable/macos/flutter_macos_v1.12.13+hotfix.8-stable.zip"
sha256 "5b5308a400bddbc29874f8fd8de7b39bb5dd8707da499c42feb3721524e784a1"
def install
prefix.install Dir["packages",".git*"]
bin.install Dir["bin/*"]
@FrenchBen
FrenchBen / vendors.txt
Last active September 12, 2018 03:00
Kubernetes Dashboard missing vendors
vendor/github.com/beorn7/perks/.gitignore
vendor/github.com/beorn7/perks/README.md
vendor/github.com/beorn7/perks/quantile/exampledata.txt
vendor/github.com/docker/distribution/.gitignore
vendor/github.com/docker/distribution/.mailmap
vendor/github.com/docker/distribution/AUTHORS
vendor/github.com/docker/distribution/BUILDING.md
vendor/github.com/docker/distribution/CHANGELOG.md
vendor/github.com/docker/distribution/CONTRIBUTING.md
vendor/github.com/docker/distribution/Dockerfile
@FrenchBen
FrenchBen / main.go
Created August 9, 2018 19:09
Simple pFlag go test
package main
import (
"flag"
"fmt"
"github.com/spf13/pflag"
)
var (