Skip to content

Instantly share code, notes, and snippets.

View peter279k's full-sized avatar
🎯
Focusing

Chun-Sheng, Li peter279k

🎯
Focusing
View GitHub Profile
@CMCDragonkai
CMCDragonkai / wework_wifi_on_linux_with_nmcli.md
Last active May 3, 2024 03:57
WeWork WiFi on Linux with `nmcli`

WeWork WiFi on Linux

When using nmcli device wifi connect 'WeWorkWiFi' password '...', you'll get something like:

Error: Failed to add/activate new connection: Failed to determine AP security information

To actually use it, you need to create a connection first and configure it:

@nbeguier
nbeguier / nginx.conf
Last active March 3, 2024 16:01
Nginx: TLS Security Configuration 2023
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name __REDACTED__;
ssl_certificate __REDACTED__ ;
ssl_certificate_key __REDACTED__;
# Only return Nginx in server header
server_tokens off;
<?php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$rules = [
'array_syntax' => ['syntax' => 'short'],
'no_unused_imports' => true,
'blank_line_after_namespace' => true,
@glubsy
glubsy / howto_record_youtube_livestreams.md
Last active May 3, 2024 07:27
How to properly record Youtube & Twitch live streams

How to record Youtube live streams:

  • use livestream_saver to download from the first segment. Can also record membership-only streams by supplying it your cookies (uses yt-dlp to download)

  • use ytarchive which basically does the same thing, except a bit better.

  • use youtube_stream_capture. You can use cookies file to get member-only streams too. Be aware that this script currently fails to download chunks as soon as the stream has ended (this might be a bug).

  • or use live-dl which does monitoring of streams too. This is a wrapper around streamlink and yt-dlp.

@Gsealy
Gsealy / clean.sh
Created February 5, 2021 08:14
clean coin miner and tsunami back door
#!/bin/env bash
# clean coin miner and tsunami back door
# Gsealy
# 2021-2-3 21:19:17
set +e
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
USER=`whoami`
@eldadfux
eldadfux / .env
Last active June 29, 2022 05:24
Appwrite 0.14 - Stack
_APP_ENV=production
_APP_LOCALE=en
_APP_OPTIONS_ABUSE=enabled
_APP_OPTIONS_FORCE_HTTPS=disabled
_APP_OPENSSL_KEY_V1=your-secret-key
_APP_DOMAIN=localhost
_APP_DOMAIN_TARGET=localhost
_APP_CONSOLE_WHITELIST_ROOT=enabled
_APP_CONSOLE_WHITELIST_EMAILS=
_APP_CONSOLE_WHITELIST_IPS=
<?php
require 'vendor/autoload.php';
use PHPUnit\Framework\TestCase;
use Facebook\WebDriver\Remote\DesiredCapabilities;
use Facebook\WebDriver\Remote\RemoteWebDriver;
use Facebook\WebDriver\WebDriverBy;
$GLOBALS['LT_USERNAME'] = "user-name";
# accessKey: AccessKey can be generated from automation dashboard or profile section
@peter279k
peter279k / aks-hands-on-lab.md
Last active September 26, 2020 05:42
This is the AKS hands-on-lab on K8s Summit 2020

容器化技術

  • 作業系統層級虛擬化
  • 透過Docker Engine
  • 可以專注在開發應用程式,不用太注意與操作虛擬化相關的操作技術

Docker image 映像檔

  • Docker Engine
  • Docker image
@peter279k
peter279k / IEC-61850_62351.md
Last active May 22, 2021 09:02
基於IEC 61850及IEC 62351之微電網保護的通訊及資安應用與測試

References