Skip to content

Instantly share code, notes, and snippets.

View lzcjames's full-sized avatar
🙈

Zichen.L lzcjames

🙈
View GitHub Profile
@lzcjames
lzcjames / cafe.ps1
Created February 27, 2021 17:50
PowerShell Simulate User Mouse and Keyboard Activity
Add-Type -AssemblyName System.Windows.Forms
# import mouse_event from user32.dll
Add-Type -MemberDefinition '[DllImport("user32.dll")] public static extern void mouse_event(int flags, int dx, int dy, int cButtons, int info);' -Name u32func -Namespace w;
function mouseMvClik($x, $y){
# mouse move
[System.Windows.Forms.Cursor]::Position = New-Object System.Drawing.Point($x,$y)
# left mouse click up
[w.u32func]::mouse_event(0x00000002, 0, 0, 0, 0);
@lzcjames
lzcjames / advanced-formatting-github-markdown.md
Created September 15, 2021 16:30 — forked from apaskulin/advanced-formatting-github-markdown.md
Tips and tricks for more formatting options in GitHub Markdown

Advanced Formatting in GitHub Markdown

GitHub Flavored Markdown lets you create useful documents in GitHub and GitHub Enterprise using .md files. Like other varieties of markdown, GitHub Markdown tries to be as readable as possible in its raw form, resulting in an intentionally limited set of formatting options. However, these options can feel restrictive when dealing with complex content.

Although GitHub Markdown strips out most HTML tags, here are a few tricks that can give you more flexibility when formatting your documents. These advanced formatting options can make your documents more useable, but they come at the expense of plain text readability, so use with caution.

@lzcjames
lzcjames / connectSFR.sh
Last active March 14, 2021 19:16
Auto-connect to SFR WiFi (Authentification automatique sur le SFR WiFi)
#!/bin/bash
# Auto-connect to SFR WiFi
# To use in combination with wicd
# by vincesafe (https://vincesafe.fr/2014/11/10/authentification-automatique-sur-le-sfr-wifi/)
# modified by lzcjames (GitHub:https://github.com/lzcjames)
# VARS
# location: URL associated with 302 reply (contains challenge)
# challenge: part of POST data to be sent
// ==UserScript==
// @name Translation
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match */*
// @grant none
// ==/UserScript==
@lzcjames
lzcjames / wt-configuration.md
Last active January 27, 2021 18:23
Windows Terminal configuration

1. Click right showing 'Windows terminal here'

In Example.reg:

Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\wt]
@="Windows terminal here"
"Icon"="%USERPROFILE%/Pictures/wt.ico"
// ==UserScript==
// @name GitLab-Warning-Editing-Master
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://innersource.soprasteria.com/*
// @grant none
// ==/UserScript==
@lzcjames
lzcjames / http2 in JBoss.md
Created May 27, 2020 08:48
http2 in JBoss
@lzcjames
lzcjames / GCP-Tips.md
Last active April 25, 2020 19:13
PCA Prep—Update and Scale Out a Containerized Application on a Kubernetes Cluster

export PROJECT_ID=YOUR-PROJECT-ID-HERE

I uploaded the src file via Cloud Shell

tar -xvzf echo-web-v2.tar.gz

docker build -t gcr.io/${PROJECT_ID}/echo-app:v2 .

docker push gcr.io/${PROJECT_ID}/echo-app:v2