Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@danielgindi
danielgindi / delete_bitbucket_lfs_files.js
Last active February 24, 2024 01:44
Bulk delete Bitbucket LFS files
(() => {
// Run this in Chrome's console, while in Bitbucket's website and logged in
const csrftoken = document.cookie.match(/\bcsrftoken=(.*?)(?:;| |$)/)[1];
const repoName = window.__initial_state__.section.repository.currentRepository.full_name;
const expiry = 1000 * 60 * 60; // Delete only files older than an hour
let page = 1;
function iterateNext() {
fetch(`https://bitbucket.org/${repoName}/admin/lfs/file-management/?iframe=true&spa=0&page=${page}`, {
# from : 10 terminal commands to speed up your Mac | defaults-write.com
# https://www.defaults-write.com/10-terminal-commands-to-speed-up-macos-sierra-on-your-mac/
#1. Disable animations when opening and closing windows.
defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false
#2. Disable animations when opening a Quick Look window.
defaults write -g QLPanelAnimationDuration -float 0
#3. Accelerated playback when adjusting the window size (Cocoa applications).
defaults write NSGlobalDomain NSWindowResizeTime -float 0.001
#4. Disable animation when opening the Info window in Finder (cmd⌘ + i).
defaults write com.apple.finder DisableAllAnimations -bool true
@Liam0205
Liam0205 / ltxtest.tex
Created October 3, 2016 13:50
demo for CJKecglue and xCJKecglue
\documentclass[UTF8]{ctexbook}
\begin{document}
汉字 English汉字
% xCJKecglue 处理在源码里本来就有的中西文之间的空格
% CJKecglue 处理在源码里没有的中西文之间的空格(需要 xeCJK 自己加上的)
\xeCJKsetup{
CJKecglue = \hskip 0.1em plus 0.08\baselineskip,
xCJKecglue = true}
@varhub
varhub / xposed_recover-from-bootlop.md
Last active June 11, 2020 07:27
XPOSED - Recover from bootloop

XPOSED - Recover from bootloop

Tested with Lollipop and Marshmallow. Some file path had been changed since ICS/KK [1].


When you activate an Xposed module and produces a bootloop, there are three options to recover it:

  1. Restore a nandroid
@jewelsea
jewelsea / FruitComboApplication.java
Last active February 10, 2023 14:02
JavaFX fxml combo box selection demonstration app
package fruit;
import java.io.IOException;
import java.net.URL;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.scene.layout.AnchorPane;
import javafx.stage.Stage;