Skip to content

Instantly share code, notes, and snippets.

@Siriusitzy
Siriusitzy / Battery Material Group Tutorial 1.md
Last active August 15, 2025 05:13
Tutorial doc about Electrolyte System Modeling and Classical MD Workflow

Electrolyte System Modeling and Classical MD Workflow

This tutorial provides a step-by-step guide for modeling electrolyte solutions and running classical molecular dynamics (MD) simulations. It is aimed at beginners and covers environment setup, required software installation, molecular modeling, simulation script preparation, job submission, and data analysis. Please follow each step closely and refer to documentation or community resources when needed.


Table of Contents

  1. Environment Setup and Software Installation
  2. Detailed Modeling Workflow
@iiLaurens
iiLaurens / code.js
Last active August 10, 2025 16:10
Get all clickable elements on a page
window.scrollTo(0, 0)
var bodyRect = document.body.getBoundingClientRect();
var items = Array.prototype.slice.call(
document.querySelectorAll('*')
).map(function(element) {
var rect=element.getBoundingClientRect();
return {
element: element,
include: (element.tagName === "BUTTON" || element.tagName === "A" || (element.onclick != null) || window.getComputedStyle(element).cursor == "pointer"),
@ruizb
ruizb / advanced-example.md
Last active September 26, 2023 20:21
Reader monad example using fp-ts

The following section is not part of monet.js documentation, but I think it's worth showing how we can compose readers using fp-ts.

Reader composition

Let's say we have the following piece of code:

interface Dependencies {
  logger: { log: (message: string) => void }
 env: 'development' | 'production'
@hkucuk
hkucuk / pywebview_open_file_dialog_sample.py
Created July 16, 2019 20:05
PyWebView Open File Dialog Sample
import webview
import base64
def open_file_dialog(window):
file_types = ('Image Files (*.bmp;*.jpg;*.gif;*.png)',
'All files (*.*)')
path = window.create_file_dialog(webview.OPEN_DIALOG,
allow_multiple=False,
file_types=file_types)
@PARC6502
PARC6502 / OpenSourceBaas.md
Last active December 10, 2025 08:51
List of open source, self hosted BaaS - Backend as a service

Backend as a Service

Supabase - ~52K stars

  • Designed explicitly as an open source firebase alternative
  • Typescript based
  • Docker support

Appwrite - ~32K stars

  • Written in JavaScript and PHP
  • Docker based
  • Realtime support across all services
@michaelchughes
michaelchughes / README.md
Last active July 1, 2025 13:10
Fixes for GLIBC errors when installing tensorflow or pytorch on older Red Hat or CentOS cluster environments

Goal

Install working tensorflow or pytorch via standard conda environment workflow.

Basic Setup : Install pytorch in a fresh conda environment

The recommended conda-based install process works smoothly:

$ # Create a fresh environment
@socool
socool / spring-boot-cheatsheet.java
Created August 21, 2018 04:16 — forked from jahe/spring-boot-cheatsheet.java
Spring Boot Cheatsheet
// Enable component-scanning and auto-configuration with @SpringBootApplication Annotation
// It combines @Configuration + @ComponentScan + @EnableAutoConfiguration
@SpringBootApplication
public class FooApplication {
public static void main(String[] args) {
// Bootstrap the application
SpringApplication.run(FooApplication.class, args);
}
}
@endolith
endolith / DFT_ANN.py
Last active December 2, 2025 14:56
Training neural network to implement discrete Fourier transform (DFT/FFT)
"""
Train a neural network to implement the discrete Fourier transform
"""
import matplotlib.pyplot as plt
import numpy as np
from tensorflow.keras.layers import Dense
from tensorflow.keras.models import Sequential
N = 32
batch = 10000
@oifland
oifland / Jenkinsfile
Last active July 15, 2024 06:36
Loops in Jenkinsfiles
// Related to https://issues.jenkins-ci.org/browse/JENKINS-26481
abcs = ['a', 'b', 'c']
node('master') {
stage('Test 1: loop of echo statements') {
echo_all(abcs)
}
stage('Test 2: loop of sh commands') {
@jonico
jonico / Jenkinsfile
Last active March 5, 2025 22:51
Example for a full blown Jenkins pipeline script with CodeQL analysis steps, multiple stages, Kubernetes templates, shared volumes, input steps, injected credentials, heroku deploy, sonarqube and artifactory integration, Docker containers, multiple Git commit statuses, PR merge vs branch build detection, REST API calls to GitHub deployment API, …
#!groovy
import groovy.json.JsonOutput
import groovy.json.JsonSlurper
def label = "mypod-${UUID.randomUUID().toString()}"
podTemplate(label: label, yaml: """
spec:
containers:
- name: mvn
image: maven:3.3.9-jdk-8