Skip to content

Instantly share code, notes, and snippets.

View PassionPenguin's full-sized avatar
♥️
Working hard on 11408

Hoarfroster PassionPenguin

♥️
Working hard on 11408
View GitHub Profile
@lierdakil
lierdakil / texsvg.hs
Last active February 19, 2022 07:29
Pandoc filter to convert math to inline svg using latex and dvisvgm
{-# LANGUAGE OverloadedStrings #-}
import Text.Pandoc.JSON
import System.Directory
import System.FilePath ((</>))
import qualified Data.Hash.MD5 as MD5
import qualified Data.Text as T
import System.IO.Temp
import System.Process
import Control.Monad (unless)
@qdequele
qdequele / gpg_resign.sh
Created February 24, 2018 10:33
Resign all my old commits with GPG key
#!/bin/sh
cd $1
git filter-branch --commit-filter '
if [ "$GIT_COMMITTER_EMAIL" = "[email protected]" ]
then
git commit-tree -S "$@";
fi
@skulumani
skulumani / 01-basic-vim-setup.md
Last active September 23, 2023 02:12
A minimal vimrc setup for LaTeX on mac and linux

Vim configuration

You can spend lots of time getting vim setup to your liking, and probably never finish customizing. My suggestion is to start small and stick to the basics before going crazy with plugins. While I've included some plugins, the hope is that you can easily get started with LaTeX with a minimal of effort and/or Googling.

Here is a small section of some of the things I've figured out to have vim working for editing LaTeX files easily.

  1. Copy the file below to a file vimrc and start vim vim -u vimrc to use the file. After all your customization if you are happy then save your configuration to ~/.vimrc.

  2. You can then start vim and install the plugins using the command :PlugInstall

<!doctype html>
<html lang="cn">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>SuccessNFail</title>
<style>
svg {
@@||ditiezu.com/forum.php
@@||ditiezu.com/misc.php?mod=swfupload
@@||ditiezu.com/home.php
@PassionPenguin
PassionPenguin / enable_flash.bat
Last active February 19, 2022 07:30
Enable Flash
REM Enable Flash in Chrome via Reg.
@echo off
echo Windows Registry Editor Version 5.00 > com.google.Chrome.reg
echo.>>com.google.Chrome.reg
echo [HKEY_CURRENT_USER\Software\Policies\Google\Chrome\PluginsAllowedForUrls]>>com.google.Chrome.reg
echo "1"="https://*">>com.google.Chrome.reg
echo "2"="http://*" >> com.google.Chrome.reg
REGEDIT com.google.Chrome.reg
del /f /s /q com.google.Chrome.reg
@PassionPenguin
PassionPenguin / texsvg.lua
Created February 19, 2022 07:25
pandoc filter to convert markdown latex into html svg with latex and dvisvgm
local default_template = [[
\documentclass[12pt,preview]{standalone}
{{ preamble }}
\begin{document}
\begin{preview}
{{ code }}
\end{preview}
\end{document}
]]
@PassionPenguin
PassionPenguin / README.md
Last active July 17, 2022 16:28
Bookan Book Generator

README

How to

  1. make sure you have access to /storage/emulated/0/Android/data/cn.com.bookan dir.
  2. make sure you have downloaded the book you want to read (the version of which must be Original Preview).
  3. copy /storage/emulated/0/Android/data/cn.com.bookan/files/bookan/magazine to your PC.

If you can run python on your android device and you can install packages with pip, you can ignore this step.

  1. install the required dependency with the file requirements.txt.
  2. copy bookan.py to the magazine folder and run the file.