This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* | |
Auto Connect to GlobalProtect VPN of PolyU | |
GlobalProtect version: 5.2.10-6 | |
*) | |
set appName to "GlobalProtect" | |
set appLanguage to getAppLanguage(appName) | |
if appLanguage starts with "zh-Hans" then | |
set disconnectLabel to "中断连接" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% This is a patch for beamer with notes | |
% Usage: | |
% Input this file before set the option for notes, e.g., | |
% | |
% \documentclass{beamer} | |
% \input{beamer-notes-patch} | |
% \setbeameroption{show notes on second screen=top} | |
% | |
% NOTE: This may still have warnings, e.g., | |
% xdvipdfmx:warning: Object @linkA already defined. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
TOOL=${TOOL:-docker} # Set TOOL to 'docker' by default. Change it to 'podman' if needed. | |
BASE_IMAGE=${BASE_IMAGE:-firedrakeproject/firedrake} | |
RUN_ARGS=${RUN_ARGS:---rm} | |
if [[ "$TOOL" == "docker" ]]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env python3 | |
import os | |
import sys | |
if len(sys.argv) < 2: | |
print('Usage: sys.argv[0] <script>') | |
exit(0) | |
scripts = sys.argv[1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bhosts | grep ok | cut -d" " -f1 | while read a; do if rsh $a test >/dev/null 2>&1; then echo $a; fi done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unbind C-b | |
set -g prefix C-a | |
setw -g mode-keys vi | |
# split window like vim | |
# vim's defination of a horizontal/vertical split is revised from tumx's | |
bind s split-window -h | |
bind v split-window -v | |
# move arount panes wiht hjkl, as one would in vim after C-w | |
bind h select-pane -L |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias cdnote='cd ~/repo/note-code/note' | |
alias lisp='if tmux ls 2>/dev/null | grep lisp >/dev/null 2>&1; then tmux a -t lisp ; else tmux new -s lisp \; splitw -l6 guile \; selectp -t 0; fi' | |
alias note='if tmux ls 2>/dev/null | grep note >/dev/null 2>&1; then tmux a -t note ; else tmux new -s note\; splitw -v -l6 \; selectp -t 0; fi' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p id="chiristmas" style="font-size: xx-large;"> </p> | |
<script type="text/javascript">// <![CDATA[ | |
var now =new Date(); | |
var new_year = new Date("Dec 25, 2012 0:0:0"); | |
var num_of_yoi = 1+( new_year.getTime() - now.getTime())/ 86400000; | |
field= document.getElementById('chiristmas'); | |
var yois = ""; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//add line num for the code in Elenment "<pre><code>" | |
function addLineNum() | |
{ | |
try { | |
var mycode = document.getElementsByTagName("code"); | |
var space = /^[ \t\b]*$/; | |
//var times = mycode.length; | |
for (var loop = 0; loop < mycode.length; ) { | |
var s = mycode[loop]; | |
var p = s.parentNode; |