Skip to content

Instantly share code, notes, and snippets.

View liq07lzucn's full-sized avatar

liq07lzucn

  • other
  • Shanghai,China
View GitHub Profile
@karthiks
karthiks / wsl-cheatsheet.ps1
Last active March 18, 2026 14:55
WSL 2 CLI Cheat-sheet To Be Run In Powershell
# wsl Help
wsl --help
# Check WSL status
wsl --status
# Check WSL version
wsl --version
# Update WSL
@miguelmota
miguelmota / fix.sh
Created September 13, 2020 21:56
Fix for "WARNING: '/usr/lib/perl5/5.30' contains data from at least 3 packages which will NOT be used by the installed perl interpreter."
yay -S --asdeps $(pacman -Qqo '/usr/lib/perl5/5.30')
  • SC1000 $ is not used specially and should therefore be escaped.
  • SC1001 This \o will be a regular 'o' in this context.
  • SC1003 Want to escape a single quote? echo 'This is how it'\''s done'.
  • SC1004 This backslash+linefeed is literal. Break outside single quotes if you just want to break the line.
  • SC1007 Remove space after = if trying to assign a value (or for empty string, use var='' ... ).
  • SC1008 This shebang was unrecognized. ShellCheck only supports sh/bash/dash/ksh. Add a 'shell' directive to specify.
  • SC1009 The mentioned parser error was in ...
  • SC1010 Use semicolo
FROM root as root
FROM geant4 as geant4
FROM get-texat as get-texat
FROM ubuntu:19.10
SHELL ["/bin/bash", "-c"]
RUN apt-get update
RUN apt-get install -y --no-install-recommends git wget build-essential cmake binutils libx11-dev libxft-dev libxext-dev libpng-dev libjpeg-dev libxpm-dev libgsl-dev python3.8-dev libxerces-c-dev libxerces-c-dev libxmu-dev libexpat1-dev freeglut3 freeglut3-dev mesa-utils
FROM ubuntu:19.10
SHELL ["/bin/bash", "-c"]
RUN mkdir /usr/src/geant4
WORKDIR /usr/src/geant4
RUN apt-get update
RUN apt-get install -y --no-install-recommends aria2 wget build-essential binutils cmake libxerces-c-dev libxmu-dev libexpat1-dev freeglut3 freeglut3-dev mesa-utils
## Download ROOT
FROM ubuntu:19.10
SHELL ["/bin/bash", "-c"]
RUN mkdir /usr/src/root
WORKDIR /usr/src/root
RUN apt-get update
RUN apt-get install -y aria2 git wget build-essential binutils libx11-dev libxft-dev libxext-dev libpng-dev libjpeg-dev libxpm-dev cmake libgsl-dev python3.8-dev
## Download ROOT
@ftclausen
ftclausen / jenkins-pipeline-mocks.groovy
Last active August 10, 2023 03:34
Jenkins pipeline very simple mock steps to test things in a standalone script
# For a more realistic simulation see https://stackoverflow.com/questions/50165079/mocking-jenkins-pipeline-steps
def readFile( Map args ) {
def file = args.file
def encoding = args.file ?: 'UTF-8'
return new File( file ).text
}
def sh( String command ) {
@liitfr
liitfr / README.md
Last active September 29, 2025 09:56
[how to revert 100644 → 100755 commits ?] #git #chmod

how to revert 100644 → 100755 commits

  • on your repo's root, run : find . -type f | xargs chmod -x
  • commit this change on files : commit -n -m 'fix: files permission from 100755 to 100644'
  • then with vim .git/config, set filemode option to false
[core]
        filemode = false
@s2504s
s2504s / Jenkinsfile
Last active June 7, 2024 10:02
Jenkins - changeset in when pipeline syntax
stages {
stage("Test changeset") {
when {
changeset "**/Jenkinsfile"
}
steps {
echo("changeset works")
}
}
@pythoninthegrass
pythoninthegrass / jenkins-docker-compose.yml
Last active January 22, 2026 11:28 — forked from SWBSanjeewa/jenkins-docker-compose
Run jenkins master and slave using docker compose
# MASTER PRE-REQS
# Install docker, docker-compose
# mkdir -p ~/{jenkins,jnlp_slave}
# master
# docker run -d \
# -u root \
# --name=jenkins \
# -e TZ=America/Denver \