Skip to content

Instantly share code, notes, and snippets.

@Nexarian
Nexarian / xrdp-nvidia-setup.sh
Last active April 30, 2024 00:39
Setup for XRDP using Nvidia Acceleration
#!/usr/bin/env bash
set -e
cd ~
sudo -v
# Make sure system is in a good, updated, clean, state.
sudo apt-get -y update
@mala
mala / meety_vuln.md
Last active December 18, 2023 05:36
Meety脆弱性 2022-11

Meety脆弱性 2022-11

文責 mala

経緯:

  • Meety退会しようと思ったがアカウントがなかったので、退会するためにアカウントを作ることにした。

免責:

  • 気になった範囲ですぐに見つかったもののうち、悪用可能なものを記載しています。
  • 好ましくないが仕様だろうというものは書いていません。
@greymd
greymd / sudo新一.md
Last active April 25, 2024 06:34
sudo新一

 オレは高校生シェル芸人 sudo 新一。幼馴染で同級生の more 利蘭と遊園地に遊びに行って、黒ずくめの男の怪しげな rm -rf / 現場を目撃した。端末をみるのに夢中になっていた俺は、背後から近づいてきたもう1人の --no-preserve-root オプションに気づかなかった。 俺はその男に毒薬を飲まされ、目が覚めたら・・・ OS のプリインストールから除かれてしまっていた!

sudo がまだ $PATH に残っていると奴らにバレたら、また命を狙われ、他のコマンドにも危害が及ぶ』

 上田博士の助言で正体を隠すことにした俺は、 which に名前を聞かれて、とっさに『gnuplot』と名乗り、奴らの情報をつかむために、父親がシェル芸人をやっている蘭の $HOME に転がり込んだ。ところが、このおっちゃん・・・とんだヘボシェル芸人で、見かねた俺はおっちゃんになりかわり、持ち前の権限昇格能力で、次々と難タスクを解決してきた。おかげで、おっちゃんは今や世間に名を知られた名エンジニア、俺はといえばシェル芸 bot のおもちゃに逆戻り。クラスメートの convertojichattextimg にお絵かきコマンドと誤解され少年ワンライナーお絵かき団を結成させられる始末。

 ではここで、博士が作ってくれたメカを紹介しよう。最初は時計型麻酔 kill 。ふたについた照準器にあわせてエンターを押せば、麻酔シグナルが飛び出し、プロセスを瞬時に sleep させることができる。 次に、蝶ネクタイ型 banner 。裏についているダイヤルを調整すれば、ありとあらゆる大きさのメッセージを標準出力できる。必殺のアイテムなら fork 力増強シューズ。電気と磁力で足を刺激し、 :(){ :|:& };: でプロセステーブ

@voluntas
voluntas / shiguredo_model.rst
Last active December 26, 2023 21:46
時雨堂を支えるビジネスモデル

時雨堂を支えるビジネスモデル

更新

2023-12-08

作者

@voluntas

バージョン

2023.2

URL

https://voluntas.github.io/

タイポなどは Twitter の @voluntas までお願いします。

import base64
import pickle
from email.mime.text import MIMEText
from googleapiclient.discovery import build
def create_message(sender, to, subject, message_text):
"""Create a message for an email.
Args:
sender: Email address of the sender.
@KMKnation
KMKnation / README.md
Last active February 17, 2024 16:00 — forked from Lazza/README.md
VPNGate Python script with python3 support

vpngate.py

This script allows to use the free VPN service provided by VPNGate in an easy way. The user just needs to provide the desidered output country, and the script automatically chooses the best server.

After this step, OpenVPN is launched with the proper configuration. The VPN can be terminated by pressing Ctrl+C.

Usage

Run the script by providing the desired output country:

@ig0rsky
ig0rsky / update-all-asdf-plugins.sh
Last active April 22, 2024 02:06
Update all asdf plugins to latest
#!/usr/bin/env bash
function log () {
printf "%s %s\n" "->" "$1"
}
log "Updating all asdf-plugin remotes..."
asdf plugin update --all
@topherPedersen
topherPedersen / strip_newline.go
Created February 3, 2020 20:56
How to Strip Newline Characters from a String in Golang
package main
import (
"fmt"
"strings"
)
func main() {
var string_a string = "My super \nsweet \nstring has \nmany newline\n characters"
@genkuroki
genkuroki / ベイズ統計の簡単な例.ipynb
Last active November 13, 2021 22:35
ベイズ統計の簡単な例
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
package main
import (
"fmt"
"golang.org/x/net/context"
cc "golang.org/x/oauth2/clientcredentials"
"io/ioutil"
"net/http"
"os"
)